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. Uoti on IRC seemed to think I shouldn't bother fixing any of these, and perhaps the easier fix would be to just make ff_id3v1_genre_str not const in the first place. Might as well drop this patch, I'll try to focus more on the suncc build. -- Sean McG. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
