On Thu, Jan 18, 2018 at 09:15:49PM +1100, Brendan McGrath wrote: > If no representation bandwidth value is set, the url value returned > by get_content_url is corrupt (as the memory has been freed). > > This change ensures the url string is not freed unless it is about > to be reused > > Signed-off-by: Brendan McGrath <red...@redmandi.dyndns.org> > --- > libavformat/dashdec.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c > index 2492f1d..83980b9 100644 > --- a/libavformat/dashdec.c > +++ b/libavformat/dashdec.c > @@ -482,9 +482,11 @@ static char *get_content_url(xmlNodePtr *baseurl_nodes, > return NULL; > } > av_strlcpy(tmp_str, url, sizeof(tmp_str)); > - av_free(url); > } > if (rep_bandwidth_val && tmp_str[0] != '\0') {
> + if (url) { > + av_free(url); > + } The if() is unneeded [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle
signature.asc
Description: PGP signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel