aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/mkrasimage.c
Commit message (Collapse)AuthorAgeFilesLines
* mkrasimage: fix segmentation faultMichael T Farnworth2020-03-291-9/+10
| | | | | | | | | | | | | | 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> (cherry picked from commit b468353a373d181c4362ff690d7b22a08f5f6949)
* build: add mkrasimageDavid Bauer2018-08-281-0/+459
The current make-ras.sh image generation script for the ZyXEL NBG6617 has portability issues with bash. Because of this, factory images are currently not built correctly by the OpenWRT buildbots. This commit replaces the make-ras.sh by C-written mkrasimage. The new mkrasimage is also compatible with other ZyXEL devices using the ras image-format. This is not tested with the NBG6616 but it correctly builds the header for ZyXEL factory image. Signed-off-by: David Bauer <mail@david-bauer.net>