diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/qconfig.py | 4 | ||||
-rw-r--r-- | tools/sfspl.c | 5 |
2 files changed, 6 insertions, 3 deletions
diff --git a/tools/qconfig.py b/tools/qconfig.py index 259adbe1bc9..c96a305a48f 100755 --- a/tools/qconfig.py +++ b/tools/qconfig.py @@ -1453,7 +1453,7 @@ def do_scan_source(path, do_update): print('\nCONFIG options used as Proper in Makefiles but without a non-xPL_ variant:') not_found = check_not_found(all_uses, MODE_PROPER) show_uses(not_found) - proper_not_found |= {not_found.keys()} + proper_not_found |= not_found.keys() # Scan the source code all_uses, _ = scan_src_files(src_list) @@ -1471,7 +1471,7 @@ def do_scan_source(path, do_update): print('\nCONFIG options used as Proper in source but without a non-xPL_ variant:') not_found = check_not_found(all_uses, MODE_PROPER) show_uses(not_found) - proper_not_found |= {not_found.keys()} + proper_not_found |= not_found.keys() print('\nCONFIG options used as SPL but without an xPL_ variant:') for item in sorted(spl_not_found): diff --git a/tools/sfspl.c b/tools/sfspl.c index c76420ce21b..516e96e8dd9 100644 --- a/tools/sfspl.c +++ b/tools/sfspl.c @@ -70,11 +70,14 @@ static int sfspl_verify_header(unsigned char *buf, int size, printf("Truncated file\n"); return EXIT_FAILURE; } + if ((size_t)size > hdr_size + file_size) + printf("File too long, expected %u bytes\n", + hdr_size + file_size); if (hdr->version != DEFAULT_VERSION) { printf("Unknown file format version\n"); return EXIT_FAILURE; } - crc_check = crc32(0, &buf[hdr_size], size - hdr_size); + crc_check = crc32(0, &buf[hdr_size], file_size); if (crc_check != crc) { printf("Incorrect CRC32\n"); return EXIT_FAILURE; |