codec/h264/h264dec/fuzz/helpers.c: actually committed this file now:

This commit is contained in:
Saxon 2019-10-20 09:36:55 +10:30
parent d0f99b581d
commit b418749be5
1 changed files with 6 additions and 0 deletions

View File

@ -30,12 +30,18 @@ typedef struct Reader Reader;
BitReader* new_BitReader(char* d, int l){ BitReader* new_BitReader(char* d, int l){
Reader* r = (Reader*)malloc(sizeof(Reader)); Reader* r = (Reader*)malloc(sizeof(Reader));
if(!r){
return NULL;
}
r->data = d; r->data = d;
r->curr = 0; r->curr = 0;
r->len = l; r->len = l;
r->err = 0; r->err = 0;
BitReader* br = (BitReader*)malloc(sizeof(BitReader)); BitReader* br = (BitReader*)malloc(sizeof(BitReader));
if(!br){
return NULL;
}
br->r = r; br->r = r;
br->n = 0; br->n = 0;
br->bits = 0; br->bits = 0;