Bug 110776

Summary: bad source code
Product: [Fedora] Fedora Reporter: d.binderman
Component: licqAssignee: Thomas Woerner <twoerner>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 1   
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: 2004-04-20 12:57:15 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 d.binderman 2003-11-24 15:38:50 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:

I just tried to compile package licq-1_2_6-1 from Fedora.

The compiler said

1.

icqpacket.cpp(2077): warning #69: integer conversion resulted in 
truncation

The source code is

        buffer->PackUnsignedShortBE(0x00660000);

but

[root@ruth SPECS]# find ../BUILD/licq-1.2.6/ -name \*.h -print | 
xargs grep PackUnsignedShortBE
../BUILD/licq-1.2.6/include/licq_buffer.h:   char *PackUnsignedShortBE
(unsigned
short data);

I think that a four byte quantity, 0x00660000 won't fit in a two byte
space, unsigned short data.

I think code would benefit from rework.


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

How reproducible:
Always

Steps to Reproduce:
1. by inspection
2.
3.
    

Additional info:

Comment 1 Thomas Woerner 2004-04-20 12:57:15 UTC
Fixed upstream in 1.2.7.