mirror of
https://github.com/xiaorouji/openwrt-passwall-packages.git
synced 2025-05-01 12:30:54 +08:00
shadowsocksr-libev: fix use-after-free due to a typo (#193)
This commit is contained in:
parent
7e408e8f51
commit
445a484de9
@ -1943,7 +1943,7 @@ main(int argc, char **argv)
|
|||||||
memcpy(text, protocol, strlen(protocol) - 11);
|
memcpy(text, protocol, strlen(protocol) - 11);
|
||||||
int length = strlen(protocol) - 11;
|
int length = strlen(protocol) - 11;
|
||||||
free(protocol);
|
free(protocol);
|
||||||
obfs = (char*)malloc(length);
|
protocol = (char*)malloc(length);
|
||||||
memset(protocol, 0x00, length);
|
memset(protocol, 0x00, length);
|
||||||
memcpy(protocol, text, length);
|
memcpy(protocol, text, length);
|
||||||
LOGI("protocol compatible enable, %s", protocol);
|
LOGI("protocol compatible enable, %s", protocol);
|
||||||
|
Loading…
Reference in New Issue
Block a user