aboutsummaryrefslogtreecommitdiffstats
path: root/tools/firmware-utils/src/utils.h
Commit message (Collapse)AuthorAgeFilesLines
* firmware-utils: mkfwimage: fix memcpy and strncpy usagePetr Štetiar2020-07-111-0/+11
Firmware is binary blob, so there are barely any NULL terminated strings expected, so we should probably convert all chars into u8 types, and after that it's clear, that using strcpy doesn't make sense anymore. This is rather theoretical stuff, but `uint8_t name[PART_NAME_LENGTH]` means, that you can supply PART_NAME_LENGTH sized name, not PART_NAME_LENGTH-1 name when NULL terminated. Ref: https://github.com/openwrt/openwrt/pull/2274 Fixes: 04cb651376f9 ("firmware-utils: mkfwimage: fix more errors reported by gcc-6/7/9") Signed-off-by: Petr Štetiar <ynezz@true.cz>