ivi_common: dont dereference null pointers.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -239,6 +239,7 @@ av_cold void ff_ivi_free_buffers(IVIPlaneDesc *planes)
|
|||||||
int p, b, t;
|
int p, b, t;
|
||||||
|
|
||||||
for (p = 0; p < 3; p++) {
|
for (p = 0; p < 3; p++) {
|
||||||
|
if (planes[p].bands)
|
||||||
for (b = 0; b < planes[p].num_bands; b++) {
|
for (b = 0; b < planes[p].num_bands; b++) {
|
||||||
av_freep(&planes[p].bands[b].bufs[0]);
|
av_freep(&planes[p].bands[b].bufs[0]);
|
||||||
av_freep(&planes[p].bands[b].bufs[1]);
|
av_freep(&planes[p].bands[b].bufs[1]);
|
||||||
|
Reference in New Issue
Block a user