Browse Source

refine the log

pull/525/head
Max Lv 9 years ago
parent
commit
c1959cac7f
2 changed files with 3 additions and 3 deletions
  1. 2
      src/encrypt.c
  2. 4
      src/udprelay.c

2
src/encrypt.c

@ -1233,7 +1233,7 @@ char * ss_decrypt_all(int buf_size, char *ciphertext, ssize_t *len, int method,
size_t c_len = *len, p_len = *len - iv_len;
int ret = 1;
if (*len < iv_len) {
if (*len <= iv_len) {
return NULL;
}

4
src/udprelay.c

@ -653,7 +653,7 @@ static void remote_recv_cb(EV_P_ ev_io *w, int revents)
#ifdef UDPRELAY_LOCAL
buf = ss_decrypt_all(BUF_SIZE, buf, &buf_len, server_ctx->method, 0);
if (buf == NULL) {
ERROR("[udp] server_ss_decrypt_all");
LOGE("[udp] server_ss_decrypt_all");
goto CLEAN_UP;
}
@ -835,7 +835,7 @@ static void server_recv_cb(EV_P_ ev_io *w, int revents)
buf = ss_decrypt_all(BUF_SIZE, buf, &buf_len, server_ctx->method, server_ctx->auth);
if (buf == NULL) {
ERROR("[udp] server_ss_decrypt_all");
LOGE("[udp] server_ss_decrypt_all");
goto CLEAN_UP;
}
#endif

Loading…
Cancel
Save