Permalink
Browse files

MUSImporter::OpenPlaylist: plug unlikely out-of-bounds access

shuts up a gcc warning; release build builds again
  • Loading branch information...
lynxlynxlynx committed Jul 3, 2014
1 parent 8f5910d commit e70aa947ff17582291d3f841cc39158932aedbe2
Showing with 5 additions and 1 deletion.
  1. +5 −1 gemrb/plugins/MUSImporter/MUSImporter.cpp
@@ -121,7 +121,11 @@ bool MUSImporter::OpenPlaylist(const char* name)
else
break;
}
- pls.PLTag[p] = 0;
+ if (p < 9) {
+ pls.PLTag[p] = 0;
+ } else {
+ pls.PLTag[9] = 0;
+ }
p = 0;
while (i < len) {
if (( line[i] == ' ' ) || ( line[i] == '\t' ))

0 comments on commit e70aa94

Please sign in to comment.