Bug 569757 - cmd.c contains invalid integer range checks on 32 bit machines
cmd.c contains invalid integer range checks on 32 bit machines
Status: CLOSED UPSTREAM
Product: Virtualization Tools
Classification: Community
Component: libguestfs (Show other bugs)
unspecified
All Linux
low Severity medium
: ---
: ---
Assigned To: Richard W.M. Jones
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-02 05:07 EST by Richard W.M. Jones
Modified: 2010-04-30 19:47 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-12 11:24:55 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard W.M. Jones 2010-03-02 05:07:36 EST
Description of problem:

cmds.c: In function 'run_set_memsize':
cmds.c:1653: warning: comparison is always false due to limited range of data type
cmds.c:1653: warning: comparison is always false due to limited range of data type
cmds.c: In function 'run_aug_init':
cmds.c:2115: warning: comparison is always false due to limited range of data type
cmds.c:2115: warning: comparison is always false due to limited range of data type
[and many more like that]

Version-Release number of selected component (if applicable):

libguestfs 1.0.85

How reproducible:

Only when compiling on a 32 bit machine.

Additional info:

The code at issue is:

    long r;
    [...]
    if (r < (-(2LL<<30)) || r > ((2LL<<30)-1)) {    <--
Comment 2 Fedora Update System 2010-04-09 10:10:40 EDT
libguestfs-1.2.1-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libguestfs-1.2.1-1.fc13
Comment 3 Fedora Update System 2010-04-13 03:44:13 EDT
libguestfs-1.2.2-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/libguestfs-1.2.2-1.fc13
Comment 4 Fedora Update System 2010-04-30 19:47:22 EDT
libguestfs-1.2.2-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.