diff options
author | Paulo Alcantara <pcacjr@gmail.com> | 2011-07-05 22:12:24 +0000 |
---|---|---|
committer | Paulo Alcantara <pcacjr@gmail.com> | 2011-07-05 22:12:24 +0000 |
commit | c2d4f9b611c43697e889d991d8a4edea92ef2d76 (patch) | |
tree | 22f8431575c1bccb2bd0ee82c40964da752e026d /extlinux | |
parent | 4d086951a915d3e6faabbff0bd5214444a405658 (diff) | |
download | syslinux-c2d4f9b611c43697e889d991d8a4edea92ef2d76.tar.gz |
extlinux: remove wrong use of strstr()syslinux-4.05-pre4
strstr() is only used for zero-terminated strings, so OEM Name is not
guaranteed to be zero-terminated. Instead, use fat_check_sb_fields() to
sanity check FAT superblock.
Signed-off-by: Paulo Alcantara <pcacjr@gmail.com>
Diffstat (limited to 'extlinux')
-rwxr-xr-x | extlinux/main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/extlinux/main.c b/extlinux/main.c index 6aa6202d..26dba7ba 100755 --- a/extlinux/main.c +++ b/extlinux/main.c @@ -347,9 +347,7 @@ int install_bootblock(int fd, const char *device) perror("reading fat superblock"); return 1; } - if (sb3.bsResSectors && sb3.bsFATs && - (strstr(sb3.bs16.FileSysType, "FAT") || - strstr(sb3.bs32.FileSysType, "FAT"))) + if (fat_check_sb_fields(&sb3)) ok = true; } if (!ok) { |