dosfs: Fix read from invalid memory area

This commit is contained in:
Sebastian Huber
2014-05-16 15:34:33 +02:00
parent 1ac0b083f8
commit 39840438bb
+1 -1
View File
@@ -631,7 +631,7 @@ msdos_filename_utf8_to_short_name_for_save (
* Strip any further characters up to a '.' or the end of the
* string.
*/
if ( *name_ptr == '.' ) {
if ( name_size > 0 && *name_ptr == '.' ) {
++name_ptr;
--name_size;
}