From 243d655cdf33345669414937844306c2670a6bdc Mon Sep 17 00:00:00 2001 From: Reuben Thomas Date: Thu, 23 Feb 2023 11:22:31 +0200 Subject: [PATCH] src/task.c: fix a potential NULL dereference (thanks, GCC!) --- src/task.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/task.c b/src/task.c index cd938f8..c619512 100644 --- a/src/task.c +++ b/src/task.c @@ -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;