[FFmpeg-devel] [PATCH 1/8] avformat/avio: check for null context to avoid uninitialized pointer access
vdixit at akamai.com
vdixit at akamai.com
Fri Mar 30 08:08:09 EEST 2018
From: Vishwanath Dixit <vdixit at akamai.com>
---
libavformat/avio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/avio.c b/libavformat/avio.c
index 63e8287..18e58ae 100644
--- a/libavformat/avio.c
+++ b/libavformat/avio.c
@@ -420,7 +420,7 @@ int ffurl_read_complete(URLContext *h, unsigned char *buf, int size)
int ffurl_write(URLContext *h, const unsigned char *buf, int size)
{
- if (!(h->flags & AVIO_FLAG_WRITE))
+ if (!h || !(h->flags & AVIO_FLAG_WRITE))
return AVERROR(EIO);
/* avoid sending too big packets */
if (h->max_packet_size && size > h->max_packet_size)
--
1.9.1
More information about the ffmpeg-devel
mailing list