mirror of
https://github.com/Waujito/youtubeUnblock.git
synced 2026-01-27 04:30:35 +03:00
fix: добавление проверки malloc
This commit is contained in:
@@ -289,6 +289,9 @@ static int parse_fake_custom_payload(
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
unsigned char *custom_buf = malloc(custom_len);
|
unsigned char *custom_buf = malloc(custom_len);
|
||||||
|
if (custom_buf == NULL) {
|
||||||
|
return -ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < custom_len; i++) {
|
for (int i = 0; i < custom_len; i++) {
|
||||||
ret = sscanf(custom_hex_fake + (i << 1), "%2hhx", custom_buf + i);
|
ret = sscanf(custom_hex_fake + (i << 1), "%2hhx", custom_buf + i);
|
||||||
|
|||||||
Reference in New Issue
Block a user