diff options
author | James Zern <jzern@google.com> | 2015-01-16 17:48:51 -0800 |
---|---|---|
committer | James Zern <jzern@google.com> | 2015-03-03 17:53:42 -0800 |
commit | b61ce861f3baa6a0dc7b95d2b7e9b45aa6c88af1 (patch) | |
tree | e5ed003bb00b95312d03338105f62f9ab219c0a6 | |
parent | df1081bb82f5d303ef3f50e8f70987b106a2aa4a (diff) | |
download | libwebp-b61ce861f3baa6a0dc7b95d2b7e9b45aa6c88af1.tar.gz |
VP8LEncodeStream: add an assert
check enc->argb_ to quiet an msvs /analyze warning:
C6387: 'enc->argb_+y*width' could be '0': this does not adhere to the
specification for the function 'memcpy'.
(cherry picked from commit f0e0677b87b22006964a17ee1e8947f5b72ebb25)
Change-Id: I87544e92ee0d3ea38942a475c30c6d552f9877b7
-rw-r--r-- | src/enc/vp8l.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/enc/vp8l.c b/src/enc/vp8l.c index 891dd01b..c2bb13d5 100644 --- a/src/enc/vp8l.c +++ b/src/enc/vp8l.c @@ -1081,6 +1081,7 @@ WebPEncodingError VP8LEncodeStream(const WebPConfig* const config, int y; err = AllocateTransformBuffer(enc, width, height); if (err != VP8_ENC_OK) goto Error; + assert(enc->argb_ != NULL); for (y = 0; y < height; ++y) { memcpy(enc->argb_ + y * width, picture->argb + y * picture->argb_stride, |