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;