History

avcodec/parser: ensure input padding is zeroed

Fixes use of uninitialized value, reported by MSAN. Found by OSS-Fuzz. Signed-off-by: Kacper Michajłow <kasper93@gmail.com>

Kacper Michajłow committed 2 years ago

Commit 5dfc0cc1 parent 2b5f0001 file · +1 −0Browse files

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

Unified · Split

libavcodec/parser.c+1−0
@@ -236,6 +236,7 @@ int ff_combine_frame(ParseContext *pc, int next, · 235 unmodified lines
236 }236 }
237 pc->buffer = new_buffer;237 pc->buffer = new_buffer;
238 memcpy(&pc->buffer[pc->index], *buf, *buf_size);238 memcpy(&pc->buffer[pc->index], *buf, *buf_size);
239 memset(&pc->buffer[pc->index + *buf_size], 0, AV_INPUT_BUFFER_PADDING_SIZE);
239 pc->index += *buf_size;240 pc->index += *buf_size;
240 return -1;241 return -1;
241 }242 }

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