Skip to content

Commit

Permalink
rr_decode: Handle errors in recursive calls
Browse files Browse the repository at this point in the history
  • Loading branch information
chouquette committed Mar 19, 2020
1 parent 0103f40 commit 89de67f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rr.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,8 @@ rr_decode(const uint8_t *ptr, size_t *n, const uint8_t *root, char **ss)
/* Avoid recursing on the same element */
if (p == orig_ptr)
goto err;
rr_decode(p, &m, root, &buf);
if (rr_decode(p, &m, root, &buf) == NULL)
goto err;
if (free_space <= strlen(buf)) {
free(buf);
goto err;
Expand Down

0 comments on commit 89de67f

Please sign in to comment.