ffmpeg: Check read_ffserver_streams() return value
authorPan Bian <bianpan2016@163.com>
Mon, 27 Nov 2017 01:12:54 +0000 (09:12 +0800)
committerMichael Niedermayer <michael@niedermayer.cc>
Tue, 28 Nov 2017 00:18:22 +0000 (01:18 +0100)
commit2ba6d7cb8278970bb9971448706c1e44ba043a81
tree4c1c2f215a7d90a8fd6dd2635c0ea8ce72ab881b
parent5b4baf1506277863e9c1fa4bd302a4653e859669
ffmpeg: Check read_ffserver_streams() return value

The function avformat_alloc_context() will return a NULL pointer on
failure. However, in function read_ffserver_streams(), its return value
is not validated and the subsequent dereference may result in a bad
memory access bug. Check its return value against NULL and avoid
potential NULL dereference.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
fftools/ffmpeg_opt.c