mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-17 14:29:48 +02:00
GetFeatures: Detect invalid VP8X/VP8/VP8L data
This facilitates early error detection during decode/render. Also, related refactoring. Change-Id: Ia6c7cd91dec202a2a68dae2118f5981cf1eaa83d
This commit is contained in:
@ -486,10 +486,6 @@ WebPMuxError MuxValidate(const WebPMux* const mux) {
|
||||
// Verify mux has at least one image.
|
||||
if (mux->images_ == NULL) return WEBP_MUX_INVALID_ARGUMENT;
|
||||
|
||||
// Validate that VP8X/VP8/VP8L chunk and canvas size are valid.
|
||||
err = MuxGetCanvasSize(mux, NULL, NULL);
|
||||
if (err != WEBP_MUX_OK) return err;
|
||||
|
||||
err = WebPMuxGetFeatures(mux, &flags);
|
||||
if (err != WEBP_MUX_OK) return err;
|
||||
|
||||
|
Reference in New Issue
Block a user