mirror of
https://github.com/ValdikSS/GoodbyeDPI.git
synced 2024-11-22 01:55:19 +01:00
Allow up to 1420 bytes in fake packet (--fake-from-hex
).
Since it's a hex string, we should double the length
This commit is contained in:
parent
8a0bef08bf
commit
a95fe3ebff
@ -251,7 +251,7 @@ static int fake_add(const unsigned char *data, size_t size) {
|
|||||||
|
|
||||||
int fake_load_from_hex(const char *data) {
|
int fake_load_from_hex(const char *data) {
|
||||||
size_t len = strlen(data);
|
size_t len = strlen(data);
|
||||||
if (len < 2 || len % 2 || len > 1420)
|
if (len < 2 || len % 2 || len > (1420 * 2))
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
unsigned char *finaldata = calloc((len + 2) / 2, 1);
|
unsigned char *finaldata = calloc((len + 2) / 2, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user