Fix a buffer overflow :)
This commit is contained in:
parent
74a217400b
commit
992214a67a
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue