Skip to content

Commit

Permalink
encode_msgpack: fix NULL dereference
Browse files Browse the repository at this point in the history
Fixes: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62368

Signed-off-by: David Korczynski <david@adalogics.com>
  • Loading branch information
DavidKorczynski committed Sep 22, 2023
1 parent b0ac0de commit 2a006b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ctr_encode_msgpack.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,9 @@ static void pack_scope_spans(mpack_writer_t *writer, struct cfl_list *scope_span

/* scope */
mpack_write_cstr(writer, "scope");
pack_instrumentation_scope(writer, scope_span->instrumentation_scope);
if (scope_span->instrumentation_scope) {
pack_instrumentation_scope(writer, scope_span->instrumentation_scope);
}

/* spans */
mpack_write_cstr(writer, "spans");
Expand Down

0 comments on commit 2a006b0

Please sign in to comment.