Skip to content

Commit a95fe3e

Browse files
committed
Allow up to 1420 bytes in fake packet (--fake-from-hex).
Since it's a hex string, we should double the length
1 parent 8a0bef0 commit a95fe3e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/fakepackets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ static int fake_add(const unsigned char *data, size_t size) {
251251

252252
int fake_load_from_hex(const char *data) {
253253
size_t len = strlen(data);
254-
if (len < 2 || len % 2 || len > 1420)
254+
if (len < 2 || len % 2 || len > (1420 * 2))
255255
return 1;
256256

257257
unsigned char *finaldata = calloc((len + 2) / 2, 1);

0 commit comments

Comments
 (0)