summaryrefslogtreecommitdiffstats
path: root/src/common.c
diff options
context:
space:
mode:
authorGravatar Comtea042026-10-05 11:44:56 +0900
committerGravatar Nikias Bassen2026-11-27 02:46:05 +0100
commit72949d4ce836a815e4cf661a84f549924b407c24 (patch)
treedc9a305e2f30050df59a21eeddff369eaa960de4 /src/common.c
parentb7a23759cb0016d4782a44368ba775f197489f69 (diff)
downloadidevicerestore-72949d4ce836a815e4cf661a84f549924b407c24.tar.gz
idevicerestore-72949d4ce836a815e4cf661a84f549924b407c24.tar.bz2
fls: Handle realloc() failure when growing the element list
fls_parse_elements() assigned the result of realloc() directly to fls->elements, so on out-of-memory the array was leaked and the next store wrote through a NULL pointer. Grow the array before allocating the next element and stop parsing if that fails. Doing it first means there is nothing to clean up on the error path (a 0x0c element is also referenced by fls->c_element), and the elements parsed so far stay valid for fls_free(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'src/common.c')
0 files changed, 0 insertions, 0 deletions