mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-02-16 11:56:56 +00:00
mkrasimage: fix segmentation fault
Code was attempting to determine the size of the file before it was actually known and allocating insufficient memory space. Images above a certain size caused a segmentation fault. Moving the calloc() ensured ensured that large images didn't result in a buffer overflow on memcpy(). Signed-off-by: Michael T Farnworth <michael@turf.org> [fixed name in From to match one in SoB] Signed-off-by: Petr Štetiar <ynezz@true.cz>
This commit is contained in:
parent
c60be19693
commit
b468353a37