Skip to content

Commit

Permalink
tgunzip: Explicitly initialize source_read_cb field.
Browse files Browse the repository at this point in the history
  • Loading branch information
pfalcon committed Jul 13, 2018
1 parent 5c2491b commit 4d11e42
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/tgunzip/tgunzip.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,10 @@ int main(int argc, char *argv[])
// uzlib_uncompress_init(&d, malloc(32768), 32768);
uzlib_uncompress_init(&d, NULL, 0);

/* all 3 fields below must be initialized by user */
d.source = source;
d.source_limit = source + len - 4;
d.source_read_cb = NULL;

res = uzlib_gzip_parse_header(&d);
if (res != TINF_OK) {
Expand Down

0 comments on commit 4d11e42

Please sign in to comment.