diff options
| author | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-03-11 15:55:01 +1100 |
|---|---|---|
| committer | TazyFoundSoup <gardendistrict0x0@outlook.com> | 2026-03-11 15:55:01 +1100 |
| commit | 98a89ce0eafa488c5ebbe963a8a601cac6739e87 (patch) | |
| tree | d3b65bbd5a2eec535a4dfc10d9c157d78f0c64d2 /src/format | |
| parent | a1b13c1da9c9d8a97ecf1771e46576820b6373a6 (diff) | |
fix(bmp): Fail BITMAP header parsing if header is not correct size
Diffstat (limited to 'src/format')
| -rw-r--r-- | src/format/image/bmp.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/format/image/bmp.c b/src/format/image/bmp.c index e565b16..dde7d7e 100644 --- a/src/format/image/bmp.c +++ b/src/format/image/bmp.c @@ -69,7 +69,9 @@ ff_result ff_bmp_header_handler(uint8_t *buf, size_t len, ff_bmp_ctx *ctx) { (void) ctx; if (len != FF_BMP_HEADER_SIZE) { - + ff_dprintf("bmp: bitmap header is not correct size (expected 14, got %d)\n", len); + ctx->last_error = FF_RESULT_ERROR_INVALID_BMP_HEADER; + return FF_RESULT_ERROR_INVALID_BMP_HEADER; } return FF_RESULT_WARN_NO_IMPL; |
