Fix a buffer overflow :)

This commit is contained in:
riccardom 2009-01-22 20:49:13 +00:00
parent 74a217400b
commit 992214a67a
1 changed files with 1 additions and 1 deletions

View File

@ -502,7 +502,7 @@ int NDS_LoadROM( const char *filename, int bmtype, u32 bmsize,
memcpy(buf+strlen(buf), &header->makerCode, 2); memcpy(buf+strlen(buf), &header->makerCode, 2);
} }
INFO("\nROM serial: %s\n\n", buf); INFO("\nROM serial: %s\n\n", buf);
strcpy(ROMserial, buf); strncpy(ROMserial, buf, sizeof(ROMserial));
return i; return i;
} }