loader: fix ub accessing data w/ pointer from before realloc
commitb111a219caf12da74cad864de129b3f2d1676c2f
authorrofl0r <rofl0r@users.noreply.github.com>
Mon, 21 Mar 2022 05:13:37 +0000 (21 05:13 +0000)
committerrofl0r <rofl0r@users.noreply.github.com>
Tue, 22 Mar 2022 03:17:24 +0000 (22 03:17 +0000)
treef362141dd93e96040537f782a3a312630f5190ca
parent7d9168586d9179451764c7c63badc5872212abe7
loader: fix ub accessing data w/ pointer from before realloc

this caused a crash trying to load a tar.xz that didn't contain
a rom, because the file was a lot bigger than the romsize it
extracted from the "header", so the realloc call resulted in
a new allocation, invalidating the old pointer. that it used
to work in the past with valid roms on the platforms tested
is pure luck.
loader.c