Skip to content

Commit

Permalink
src/task.c: fix a potential NULL dereference (thanks, GCC!)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrthomas committed Feb 24, 2023
1 parent 7606d82 commit 243d655
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ recode_put_bytes (const char *data, size_t n, RECODE_SUBTASK subtask)
subtask->output.limit = subtask->output.buffer + new_size;
}
else
recode_if_nogo (RECODE_SYSTEM_ERROR, subtask);
{
recode_if_nogo (RECODE_SYSTEM_ERROR, subtask);
return;
}
}
memcpy (subtask->output.cursor, data, n);
subtask->output.cursor += n;
Expand Down

0 comments on commit 243d655

Please sign in to comment.