[FFmpeg-cvslog] postproc: fix null pointer dereference with invalid option strings

Michael Niedermayer git at videolan.org
Wed Dec 11 22:50:27 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 11 22:24:51 2013 +0100| [f6173fed608b81e70f40664f356d127618851427] | committer: Michael Niedermayer

postproc: fix null pointer dereference with invalid option strings

Fixes CID1135760
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6173fed608b81e70f40664f356d127618851427
---

 libpostproc/postprocess.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libpostproc/postprocess.c b/libpostproc/postprocess.c
index b34943f..da586ff 100644
--- a/libpostproc/postprocess.c
+++ b/libpostproc/postprocess.c
@@ -719,6 +719,10 @@ pp_mode *pp_get_mode_by_name_and_quality(const char *name, int quality)
         if(filterToken == NULL) break;
         p+= strlen(filterToken) + 1; // p points to next filterToken
         filterName= strtok(filterToken, optionDelimiters);
+        if (filterName == NULL) {
+            ppMode->error++;
+            break;
+        }
         av_log(NULL, AV_LOG_DEBUG, "pp: %s::%s\n", filterToken, filterName);
 
         if(*filterName == '-'){



More information about the ffmpeg-cvslog mailing list