Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix security scan report issue #1172 #1173 #1174 #1175" #1178

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion trunk/src/app/srs_app_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,6 @@ int SrsServer::acquire_pid_file()
if(errno == EACCES || errno == EAGAIN) {
ret = ERROR_SYSTEM_PID_ALREADY_RUNNING;
srs_error("srs is already running! ret=%#x", ret);
::close(fd);
return ret;
}

Expand Down
3 changes: 0 additions & 3 deletions trunk/src/app/srs_app_utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ int srs_socket_connect(string server, int port, int64_t timeout, st_netfd_t* pst
if(stfd == NULL){
ret = ERROR_ST_OPEN_SOCKET;
srs_error("st_netfd_open_socket failed. ret=%d", ret);
::close(sock);
return ret;
}

Expand All @@ -95,14 +94,12 @@ int srs_socket_connect(string server, int port, int64_t timeout, st_netfd_t* pst
srs_info("connect ok. server=%s, ip=%s, port=%d", server.c_str(), ip.c_str(), port);

*pstfd = stfd;
::close(sock);
return ret;

failed:
if (stfd) {
srs_close_stfd(stfd);
}
::close(sock);
return ret;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/src/kernel/srs_kernel_codec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ string srs_codec_avc_level2str(SrsAvcLevel level)
// 1 = 11 kHz = 11025 Hz
// 2 = 22 kHz = 22050 Hz
// 3 = 44 kHz = 44100 Hz
int flv_sample_rates[] = {5512, 11025, 22050, 44100, 0};
int flv_sample_rates[] = {5512, 11025, 22050, 44100};

// the sample rates in the codec,
// in the sequence header.
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/kernel/srs_kernel_utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ int srs_av_base64_decode(u_int8_t* out, const char* in_str, int out_size)
// no sign extension
const u_int8_t *in = (const u_int8_t*)in_str;
unsigned bits = 0xff;
unsigned v = 0;
unsigned v;

while (end - dst > 3) {
BASE64_DEC_STEP(0);
Expand Down