History

avcodec/parser: Reset *buf_size on realloc failure

Fixes: out of array access Fixes: crash-0d640731c7da52415670eb47a2af701cbe2e1a3b Fixes: crash-e745864ead6ea418959c8df56de2765571201dae

Reimar Döffinger committed 2 years ago

Commit 605fc721 parent 384cc271 file · +1 −0Browse files

Unified · Split

libavcodec/parser.c+1−0
@@ -252,6 +252,7 @@ int ff_combine_frame(ParseContext *pc, int next, · 251 unmodified lines
252252 AV_INPUT_BUFFER_PADDING_SIZE);
253253 if (!new_buffer) {
254254 av_log(NULL, AV_LOG_ERROR, "Failed to reallocate parser buffer to %d\n", next + pc->index + AV_INPUT_BUFFER_PADDING_SIZE);
255+ *buf_size =
255256 pc->overread_index =
256257 pc->index = 0;
257258 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