diff options
Diffstat (limited to 'vendor/golang.org/x/image')
| -rw-r--r-- | vendor/golang.org/x/image/webp/decode.go | 5 | 
1 files changed, 5 insertions, 0 deletions
| diff --git a/vendor/golang.org/x/image/webp/decode.go b/vendor/golang.org/x/image/webp/decode.go index d6eefd596..e211c7d57 100644 --- a/vendor/golang.org/x/image/webp/decode.go +++ b/vendor/golang.org/x/image/webp/decode.go @@ -39,6 +39,7 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {  		alpha          []byte  		alphaStride    int  		wantAlpha      bool +		seenVP8X       bool  		widthMinusOne  uint32  		heightMinusOne uint32  		buf            [10]byte @@ -113,6 +114,10 @@ func decode(r io.Reader, configOnly bool) (image.Image, image.Config, error) {  			return m, image.Config{}, err  		case fccVP8X: +			if seenVP8X { +				return nil, image.Config{}, errInvalidFormat +			} +			seenVP8X = true  			if chunkLen != 10 {  				return nil, image.Config{}, errInvalidFormat  			} | 
