History

avcodec/cbs_sei: Always zero-initialize SEI payload

Fixes: Use-of-uninitialized value Fixes: clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-5458626041413632

Andreas Rheinhardt committed 2 years ago

Commit bfcee361 parent 5dfc0cc1 file · +1 −3Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/cbs_sei.c+1−3
@@ -41,7 +41,6 @@ int ff_cbs_sei_alloc_message_payload(SEIRawMessage *message, · 40 unmodified lines
4141 const SEIMessageTypeDescriptor *desc)
4242 {
4343 void (*free_func)(FFRefStructOpaque, void*);
44− unsigned flags = 0;
4544
4645 av_assert0(message->payload == NULL &&
4746 message->payload_ref == NULL);
@@ -53,10 +52,9 @@ int ff_cbs_sei_alloc_message_payload(SEIRawMessage *message, · 5 unmodified lines
5352 free_func = &cbs_free_user_data_unregistered;
5453 else {
5554 free_func = NULL;
56− flags = FF_REFSTRUCT_FLAG_NO_ZEROING;
5755 }
5856
59− message->payload_ref = ff_refstruct_alloc_ext(desc->size, flags,
57+ message->payload_ref = ff_refstruct_alloc_ext(desc->size, 0,
6058 NULL, free_func);
6159 if (!message->payload_ref)
6260 return AVERROR(ENOMEM);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t