diff options
| author | 2026-11-24 20:15:05 +0100 | |
|---|---|---|
| committer | 2026-11-24 20:15:05 +0100 | |
| commit | fc0b5e4f680698b9713d9795c3598bf3373e7905 (patch) | |
| tree | 73545d95da81e14c1043c903a42152ebaa27ab86 /include/libirecovery.h | |
| parent | 76d655623e917ab532490bc5f0ff5c3b404718e3 (diff) | |
| download | libirecovery-fc0b5e4f680698b9713d9795c3598bf3373e7905.tar.gz libirecovery-fc0b5e4f680698b9713d9795c3598bf3373e7905.tar.bz2 | |
irecovery: Fix buffer overflow when reading scripts from pipes
buffer_read_from_filename() used fseek()/ftell() to determine the file
size. On non-seekable input such as /dev/stdin ftell() returns -1, which
was used as the size, making malloc(size + 1) wrap to 0 and the later
buffer[length] write go out of bounds.
Read the file in chunks until EOF instead, which also allows using
/dev/stdin and pipes as script source.
Diffstat (limited to 'include/libirecovery.h')
0 files changed, 0 insertions, 0 deletions
