On 2020-06-21 21:19 +0200, Alexander Strasser wrote: > On 2020-06-21 12:49 +0000, Paul B Mahol wrote: > > ffmpeg | branch: master | Paul B Mahol <one...@gmail.com> | Sun Jun 21 > > 14:46:29 2020 +0200| [842bc312ade8fab82465423b22c4fbe3bee63383] | > > committer: Paul B Mahol > > > > avfilter/af_ladspa: check another directory for plugins > > > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=842bc312ade8fab82465423b22c4fbe3bee63383 > > --- > > > > libavfilter/af_ladspa.c | 5 +++++ > > 1 file changed, 5 insertions(+) > > > > diff --git a/libavfilter/af_ladspa.c b/libavfilter/af_ladspa.c > > index a8562fc073..68537c5029 100644 > > --- a/libavfilter/af_ladspa.c > > +++ b/libavfilter/af_ladspa.c > > @@ -426,6 +426,11 @@ static av_cold int init(AVFilterContext *ctx) > > } > > > > av_free(paths); > > + if (!s->dl_handle && (paths = av_asprintf("%s/.ladspa", > > getenv("HOME")))) { > > I think this will result in undefined behavior by using %s with a NULL > argument if HOME isn't found in the environment. > > As there's at least one more occurrence (see diff context below), it > would probably be best to define a file local helper function.
Ah, so the occurrence below was the only other one. Thanks for fixing this quickly in commit fdac3c80ac65f ! Alexander > > > + s->dl_handle = try_load(paths, s->dl_name); > > + av_free(paths); > > + } > > + > > if (!s->dl_handle && (paths = av_asprintf("%s/.ladspa/lib", > > getenv("HOME")))) { > > s->dl_handle = try_load(paths, s->dl_name); > > av_free(paths); _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".