Commits

Shlomi Fish committed 1da3b73

Another bug fix reported by Gentoo:

Found out by gcc-4.7

* QA Notice: Package triggers severe warnings which indicate that it
* may exhibit random runtime failures.
* ../loaders/load_gt2.c:220:29: warning: array subscript is above array bounds [-Warray-bounds]

* Please do not file a Gentoo bug and instead report the above QA
* issues directly to the upstream developers of this software.
* Homepage: http://mikmod.shlomifish.org/

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
diff --git a/loaders/load_gt2.c b/loaders/load_gt2.c

Comments (0)

Files changed (1)

libmikmod/loaders/load_gt2.c

 		_mm_read_M_ULONGS(&new_chunk->gt2.chunk_size, 1, modreader);
 		new_chunk->gt2.module_name[32] = 0;
 		_mm_read_UBYTES(&new_chunk->gt2.module_name, 32, modreader);
-		new_chunk->gt2.module_name[160] = 0;
+		new_chunk->gt2.comments_author[160] = 0;
 		_mm_read_UBYTES(&new_chunk->gt2.comments_author, 160, modreader);
 		_mm_read_UBYTES(&new_chunk->gt2.date_day, 1, modreader);
 		_mm_read_UBYTES(&new_chunk->gt2.date_month, 1, modreader);