diff options
author | John Stebbins <[email protected]> | 2019-01-15 16:35:27 -0800 |
---|---|---|
committer | John Stebbins <[email protected]> | 2019-01-20 11:06:51 -0800 |
commit | 7dcbdcce4b33473f679594403b98bdda330b1b49 (patch) | |
tree | ac8ed2182fe34537744f1cd3b36a9e0ce0de89ee /libhb | |
parent | 5f10e030d7d5029b6470485a70d377ebec9c77db (diff) |
Fix potential NULL pointer dereference
Diffstat (limited to 'libhb')
-rw-r--r-- | libhb/fifo.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libhb/fifo.c b/libhb/fifo.c index 4288f5700..70c3eca81 100644 --- a/libhb/fifo.c +++ b/libhb/fifo.c @@ -450,8 +450,11 @@ void hb_buffer_realloc( hb_buffer_t * b, int size ) { return; } - memcpy(tmp, b->data, b->alloc); - av_free(b->data); + if (b->data != NULL) + { + memcpy(tmp, b->data, b->alloc); + av_free(b->data); + } b->data = tmp; b->alloc = size; |