Changes

Jump to navigation Jump to search
156 bytes added ,  06:28, 10 June 2016
Line 159: Line 159:  
| ''This was not tested on hardware.''
 
| ''This was not tested on hardware.''
   −
The extdata SaveData.dat file-reading code allocates a fixed-size heap buffer for the expected SaveData.dat filesize, then reads the filedata into this buffer using the actual FS filesize. Before v5.0 the filesize used here wasn't validated, hence if the filesize is larger than alloc_size a buffer overflow would occur.
+
The extdata SaveData.dat file-reading code allocates a fixed-size heap buffer for the expected SaveData.dat filesize, then reads the filedata into this buffer using the actual FS filesize. Before v5.0 the filesize used here wasn't validated, hence if the filesize is larger than alloc_size a buffer overflow would occur. ''After'' doing the file-read it does validate that the actual_readsize matches the alloc_size, but at this point the buffer overflow has already occurred.
    
It's unknown whether v5.0 had similar changes for other extdata file-loading code.
 
It's unknown whether v5.0 had similar changes for other extdata file-loading code.

Navigation menu