mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
add missing ABI compatibility checks
original change:
f7f16a2
add ABI compatibility check
Change-Id: I7cd6508f8d8e0d957a3d62ad52a117876fa5ec29
This commit is contained in:
@ -167,7 +167,9 @@ VP8StatusCode WebPAllocateDecBuffer(int w, int h,
|
||||
// constructors / destructors
|
||||
|
||||
int WebPInitDecBufferInternal(WebPDecBuffer* buffer, int version) {
|
||||
if (version != WEBP_DECODER_ABI_VERSION) return 0; // version mismatch
|
||||
if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_DECODER_ABI_VERSION)) {
|
||||
return 0; // version mismatch
|
||||
}
|
||||
if (buffer == NULL) return 0;
|
||||
memset(buffer, 0, sizeof(*buffer));
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user