Fix 1 byte overflow in pyc parser ##crash

* Reproducer: $ r2 negmarshall378
This commit is contained in:
pancake 2024-02-16 07:52:53 +01:00
parent d4d73836b3
commit 2db25da77e

View File

@ -359,7 +359,7 @@ static pyc_object *get_complex_object(RBuffer *buffer) {
} else {
n2 = get_st32 (buffer, &error);
}
if (error) {
if (error || n2 < 1) {
return NULL;
}
ut8 *s2 = malloc (n2 + 1);