From b418749be5e34a310ede76f6e41f3ef681463f1e Mon Sep 17 00:00:00 2001 From: Saxon Date: Sun, 20 Oct 2019 09:36:55 +1030 Subject: [PATCH] codec/h264/h264dec/fuzz/helpers.c: actually committed this file now: --- codec/h264/h264dec/fuzz/helpers.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/codec/h264/h264dec/fuzz/helpers.c b/codec/h264/h264dec/fuzz/helpers.c index dd9a107a..25a8d203 100644 --- a/codec/h264/h264dec/fuzz/helpers.c +++ b/codec/h264/h264dec/fuzz/helpers.c @@ -30,12 +30,18 @@ typedef struct Reader Reader; BitReader* new_BitReader(char* d, int l){ Reader* r = (Reader*)malloc(sizeof(Reader)); + if(!r){ + return NULL; + } r->data = d; r->curr = 0; r->len = l; r->err = 0; BitReader* br = (BitReader*)malloc(sizeof(BitReader)); + if(!br){ + return NULL; + } br->r = r; br->n = 0; br->bits = 0;