mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-13 14:34:33 +02:00
check VP8LBitWriterInit return
Change-Id: I460906281598f5792bd75a25b14b449c8daaff8c
This commit is contained in:
@ -1057,7 +1057,10 @@ int VP8LEncodeImage(const WebPConfig* const config,
|
||||
|
||||
width = picture->width;
|
||||
height = picture->height;
|
||||
VP8LBitWriterInit(&bw, (width * height) >> 1);
|
||||
if (!VP8LBitWriterInit(&bw, (width * height) >> 1)) {
|
||||
err = VP8_ENC_ERROR_OUT_OF_MEMORY;
|
||||
goto Error;
|
||||
}
|
||||
|
||||
if (!WebPReportProgress(picture, 1, &percent)) {
|
||||
UserAbort:
|
||||
|
Reference in New Issue
Block a user