mirror of
https://github.com/kenzok8/small.git
synced 2025-01-08 12:08:21 +08:00
update 2024-03-26 19:57:50
This commit is contained in:
parent
3453371910
commit
b04cf8c444
15
shadowsocksr-libev/patches/104-fix-use-after-free.patch
Normal file
15
shadowsocksr-libev/patches/104-fix-use-after-free.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/server/server.c
|
||||
+++ b/server/server.c
|
||||
@@ -1942,11 +1942,11 @@ main(int argc, char **argv)
|
||||
text = (char*)malloc(strlen(protocol) - 11);
|
||||
memcpy(text, protocol, strlen(protocol) - 11);
|
||||
int length = strlen(protocol) - 11;
|
||||
- free(protocol);
|
||||
obfs = (char*)malloc(length);
|
||||
memset(protocol, 0x00, length);
|
||||
memcpy(protocol, text, length);
|
||||
LOGI("protocol compatible enable, %s", protocol);
|
||||
+ free(protocol);
|
||||
free(text);
|
||||
protocol_compatible = 1;
|
||||
}
|
Loading…
Reference in New Issue
Block a user