[FFmpeg-cvslog] graphparser: add a NULL check on the argument passed to strstr
Stefano Sabatini
git at videolan.org
Wed Mar 30 22:34:43 CEST 2011
ffmpeg | branch: master | Stefano Sabatini <stefano.sabatini-lala at poste.it> | Wed Mar 30 21:30:31 2011 +0200| [2f86e7bd12d8023da3349f10490b1e5b64531e23] | committer: Stefano Sabatini
graphparser: add a NULL check on the argument passed to strstr
Fix crash in create_filter() which occurrs if a scale filter with no
args is provided.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f86e7bd12d8023da3349f10490b1e5b64531e23
---
libavfilter/graphparser.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c
index 47179e5..4f11529 100644
--- a/libavfilter/graphparser.c
+++ b/libavfilter/graphparser.c
@@ -121,7 +121,7 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
return ret;
}
- if (!strcmp(filt_name, "scale") && !strstr(args, "flags")) {
+ if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
args, ctx->scale_sws_opts);
args = tmp_args;
More information about the ffmpeg-cvslog
mailing list