vpx_image: clear user provided vpx_image_t early
authorJames Zern <jzern@google.com>
Fri, 9 Apr 2021 00:34:16 +0000 (17:34 -0700)
committerJames Zern <jzern@google.com>
Fri, 9 Apr 2021 00:34:16 +0000 (17:34 -0700)
commit1c792f2991e632be26414ecb62835bf148c086b4
treeafafbdae41d44457d0b51ecae6d5c7fba9c74364
parent72dc6478ac65dbf8b9c4b14c52937396a7bd24b4
vpx_image: clear user provided vpx_image_t early

this avoids uninitialized values and potential misuse of them which
could lead to a crash should the function fail

this is the same fix that was applied in libaom:
d0cac70b5 Fix a free on invalid ptr when img allocation fails

Bug: webm:1722
Change-Id: If7a8d08c4b010f12e2e1d848613c0fa7328f1f9c
vpx/src/vpx_image.c