Skip to content

Commit

Permalink
Merge pull request #1441 from zxlhhyccc/patch-46
Browse files Browse the repository at this point in the history
shadowsocksr-libev: fix use-after-free due to a typo
  • Loading branch information
coolsnowwolf authored Apr 1, 2024
2 parents 7e632a1 + 68350a7 commit 15ec1d7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions shadowsocksr-libev/patches/104-fix-use-after-free.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- a/server/server.c
+++ b/server/server.c
@@ -1943,7 +1943,7 @@ main(int argc, char **argv)
memcpy(text, protocol, strlen(protocol) - 11);
int length = strlen(protocol) - 11;
free(protocol);
- obfs = (char*)malloc(length);
+ protocol = (char*)malloc(length);
memset(protocol, 0x00, length);
memcpy(protocol, text, length);
LOGI("protocol compatible enable, %s", protocol);

0 comments on commit 15ec1d7

Please sign in to comment.