From 192c713c9ab0e5597f2f690ebdf777203dcbcbbb Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 5 Aug 2016 14:56:14 +0200 Subject: Fix bugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/state.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/state.c') diff --git a/src/state.c b/src/state.c index d840ccb..71e2146 100644 --- a/src/state.c +++ b/src/state.c @@ -298,6 +298,10 @@ size_t state_unmarshal(const void* restrict buf) outputs_n = *(const size_t*)(bs + off); off += sizeof(size_t); + outputs = calloc(outputs_n, sizeof(*outputs)); + if (outputs == NULL) + return 0; + for (i = 0; i < outputs_n; i++) { off += n = output_unmarshal(outputs + i, bs + off); -- cgit v1.2.3-70-g09d2