diff --git a/shadowsocksr-libev/patches/104-fix-use-after-free.patch b/shadowsocksr-libev/patches/104-fix-use-after-free.patch new file mode 100644 index 00000000000..5095eca37dd --- /dev/null +++ b/shadowsocksr-libev/patches/104-fix-use-after-free.patch @@ -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);