Skip to content

Commit b81f05a

Browse files
DavidKorczynskiedsiper
authored andcommitted
decode_opentelemetry: fix NULL deref
Fixes: https://issues.oss-fuzz.com/issues/412744484 Signed-off-by: David Korczynski <[email protected]>
1 parent 1262185 commit b81f05a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ctr_decode_opentelemetry.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ int ctr_decode_opentelemetry_create(struct ctrace **out_ctr,
540540

541541
for (resource_span_index = 0; resource_span_index < service_request->n_resource_spans; resource_span_index++) {
542542
otel_resource_span = service_request->resource_spans[resource_span_index];
543-
if (otel_resource_span == NULL) {
543+
if (otel_resource_span == NULL || otel_resource_span->resource == NULL) {
544544
opentelemetry__proto__collector__trace__v1__export_trace_service_request__free_unpacked(service_request, NULL);
545545
ctr_destroy(ctr);
546546
return CTR_DECODE_OPENTELEMETRY_INVALID_PAYLOAD;

0 commit comments

Comments
 (0)