Stop supporting kUnknown_BmpHeaderType
In SkBmpCodec, if the header size does not match a known header,
stop trying to create an SkCodec. We do not know of any BMPs with
arbitrarily sized headers, so this should not cause any real
In addition, this fixes a bug where we attempt to read too much data
from a file. Since we attempt to read the header size in one read,
and a size reported by the "BMP" may be larger than SSIZE_MAX, this
will crash when reading from a file.
Add a test.
Commit-Queue: Leon Scroggins <firstname.lastname@example.org>
Reviewed-by: Matt Sarett <email@example.com>
(cherry picked from commit 0b24cbd9db8b894fdabce7a27f5369b320bee7f1)
1 file changed