diff options
Diffstat (limited to 'src/state.c')
-rw-r--r-- | src/state.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); |