On Mon, Dec 12, 2011 at 9:25 PM, Sean McGovern <[email protected]> wrote: > On Tue, Dec 13, 2011 at 12:07 AM, Alex Converse <[email protected]> > wrote: >> On Mon, Dec 12, 2011 at 7:06 PM, Sean McGovern <[email protected]> wrote: >>> >>> 'ff_id3v1_genre_str' is declared const, so don't assign it directly >>> to another variable that is not also declared const. >>> --- >>> libavformat/id3v2.c | 2 +- >>> 1 files changed, 1 insertions(+), 1 deletions(-) >>> >>> diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c >>> index deb652d..65a6f9c 100644 >>> --- a/libavformat/id3v2.c >>> +++ b/libavformat/id3v2.c >>> @@ -243,7 +243,7 @@ static void read_ttag(AVFormatContext *s, AVIOContext >>> *pb, int taglen, const cha >>> && (sscanf(dst, "(%d)", &genre) == 1 || sscanf(dst, "%d", &genre) >>> == 1) >>> && genre <= ID3v1_GENRE_MAX) { >>> av_freep(&dst); >> >> dst is NULL from av_freep >> >>> - dst = ff_id3v1_genre_str[genre]; >>> + av_strlcpy(dst, ff_id3v1_genre_str[genre], ID3v1_GENRE_MAX + 1); >> >> You are copying into a NULL pointer. Perhaps you mean dst = >> av_strdup(ff_id3v1_genre_str[genre])? >> > > You are of course absolutely correct -- I should've just walked away > from my computer today. >
Happens to the best of us. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
