denx.biz
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview
thread

[U-Boot-Users] bug in fs/fat/fat.c

Jang Ik-Joon

28 Aug 2007 28 Aug '07
9:17 a.m.

In get_contents function (fs/fat/fat.c), There is code that checks the return value of get_fatent() at 360th line.

355http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l355 /* search for consecutive clusters */ 356http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l356 while(actsize < filesize) { 357http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l357 newclust = get_fatent(mydata, endclust); 358http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l358 if((newclust -1)!=endclust) 359http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l359 goto getit; 360http://www.denx.de/cgi-bin/gitweb.cgi?p=u-boot.git;a=blob;f=fs/fat/fat.c;h=e98e50ae774bc2802d183e5888f26ec7b9b8fef1;hb=HEAD#l360 if (newclust <= 0x0001 || newclust >= 0xfff0) {

I think this comparison ( >= 0xfff0 ) is only for FAT16. FAT32 value can be much larger. Is this a bug?

Attachments:

  • attachment.html (text/html — 2.7 KB)
0 0
Reply

Back to the thread

Back to the list

HyperKitty Powered by HyperKitty version 1.3.8.