Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Oct 2014 16:47:00 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 194250] New: c_size() function parses terabyte sized files incorrectly due to incorrect scale factor
Message-ID:  <bug-194250-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194250

            Bug ID: 194250
           Summary: c_size() function parses terabyte sized files
                    incorrectly due to incorrect scale factor
           Product: Base System
           Version: 11.0-CURRENT
          Hardware: Any
                OS: Any
            Status: Needs Triage
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: turingsboy@yahoo.com

In usr.bin/find/function.c in c_size() function, when parsing 
terabyte sized files, it incorrectly thinks 1 TB is 64  GB.

case 'T':                       /* terabytes 1<<40 */

scale = 0x1000000000LL;

...

0x1000000000 bytes = 64GB

The correct code should read:

...

case 'T':                       /* terabytes 1<<40 */

scale = 0x10000000000LL;

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194250-8>