History

Add missing memory check in parse_inputs(), and fix possible (yet very unlikely) crash.

Originally committed as revision 25697 to svn://svn.ffmpeg.org/ffmpeg/trunk

Stefano Sabatini committed 16 years ago

Commit 00b3ca31 parent 42e7f6d1 file · +2 −1Browse files

Showing the changes to libavfilter/graphparser.c (1 of 1 file). Show all

Unified · Split

libavfilter/graphparser.c+2−1
@@ -258,7 +258,8 @@ static int parse_inputs(const char **buf, AVFilterInOut **curr_inputs, · 257 unmodified lines
258258 av_free(name);
259259 } else {
260260 /* Not in the list, so add it as an input */
261− match = av_mallocz(sizeof(AVFilterInOut));
261+ if (!(match = av_mallocz(sizeof(AVFilterInOut))))
262+ return AVERROR(ENOMEM);
262263 match->name = name;
263264 match->pad_idx = pad;
264265 }

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