• Status Closed
  • Percent Complete
  • Task Type Patches
  • Category Operating System/Drivers
  • Assigned To No-one
  • Operating System All players
  • Severity Low
  • Priority Very Low
  • Reported Version Version 3.1
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: Rockbox
Opened by kugel. - 2009-01-27
Last edited by MarcinBukat - 2011-06-05

FS#9838 - Filesize > 2GB reported negative

My windows 7 beta image is reported to be of a size of -937,678,848 (Rockbox file properties plugin). The correct filesize is 3,357,288,448

Besides that it’s entirely wrong, being negative is weird on top.

Looking through the code shows that the dircache_entry’s size member is of type long, making negative values possible.

Changing it to unsigned long/size_t results in the correct filesize. Compilation was warning-less.

Can an expert comment on this and if the change is good and won’t break anything.

Closed by  MarcinBukat
2011-06-05 12:40
Reason for closing:  Wont Fix
Additional comments about closing:   Warning: Undefined array key "typography" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 371 Warning: Undefined array key "camelcase" in /home/rockbox/flyspray/plugins/dokuwiki/inc/parserutils.php on line 407

general 32bit issue

filesize should certainly be an unsigned value. I’d go with unsigned long rather than size_t though:

I’m unsure what 64-bit compilers make of size_t vs unsigned long, however - that might favour size_t…

Well, the standard says size_t is unsigned, so…I’m not entirely sure what the problem of that guy was in that article.

amiconn however said, that filesize must me signed.


Available keyboard shortcuts


Task Details

Task Editing