diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-10-29 18:33:11 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-11-13 22:41:01 +0100 |
commit | 9a2028d4f4d628ba2d70a182414b709aabcb9a17 (patch) | |
tree | fac905295382896558c19ae2bf134fa17fd8dfc2 /libavfilter | |
parent | af9ec3dd1d9e90ec8134b01074b7beb01a1beb1a (diff) | |
download | ffmpeg-9a2028d4f4d628ba2d70a182414b709aabcb9a17.tar.gz |
lavfi/frei0r: correctly handle paths longer than 1023 chars
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/vf_frei0r.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index 9928113644..29353943f2 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -236,9 +236,11 @@ static av_cold int frei0r_init(AVFilterContext *ctx, av_free(path); } if (!frei0r->dl_handle && (path = getenv("HOME"))) { - char prefix[1024]; - snprintf(prefix, sizeof(prefix), "%s/.frei0r-1/lib/", path); + char *prefix = av_asprintf("%s/.frei0r-1/lib/", path); + if (!prefix) + return AVERROR(ENOMEM); frei0r->dl_handle = load_path(ctx, prefix, dl_name); + av_free(prefix); } if (!frei0r->dl_handle) frei0r->dl_handle = load_path(ctx, "/usr/local/lib/frei0r-1/", dl_name); |