Bug 569757

Summary: cmd.c contains invalid integer range checks on 32 bit machines
Product: [Community] Virtualization Tools Reporter: Richard W.M. Jones <rjones>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: mbooth, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-12 16:24:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Richard W.M. Jones 2010-03-02 10:07:36 UTC
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 14:10:40 UTC
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 07:44:13 UTC
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 23:47:22 UTC
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.