'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 = ff_id3v1_genre_str[genre];
+ av_strlcpy(dst, ff_id3v1_genre_str[genre], ID3v1_GENRE_MAX + 1);
} else if (!(strcmp(key, "TXXX") && strcmp(key, "TXX"))) {
/* dst now contains the key, need to get value */
key = dst;
--
1.7.8
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel