mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 06:24:27 +02:00
imageio/*dec,Read*: add input parameter checks
Change-Id: I5e069d6ea4da9d8c71be03ef99aad679dd1aad21
This commit is contained in:
@ -143,6 +143,8 @@ int ReadWebP(const uint8_t* const data, size_t data_size,
|
||||
WebPDecBuffer* const output_buffer = &config.output;
|
||||
WebPBitstreamFeatures* const bitstream = &config.input;
|
||||
|
||||
if (data == NULL || data_size == 0 || pic == NULL) return 0;
|
||||
|
||||
// TODO(jzern): add Exif/XMP/ICC extraction.
|
||||
if (metadata != NULL) {
|
||||
fprintf(stderr, "Warning: metadata extraction from WebP is unsupported.\n");
|
||||
|
Reference in New Issue
Block a user