Bug 6166 - Integer overflow detected in nt_status.h
Integer overflow detected in nt_status.h
Status: NEW
Product: Samba 3.3
Classification: Unclassified
Component: File services
3.3.1
Sparc Solaris
: P3 normal
: ---
Assigned To: Jeremy Allison
Samba QA Contact
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-05 14:26 UTC by John Center
Modified: 2009-05-03 08:21 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Center 2009-03-05 14:26:26 UTC
Building 64bit binaries with Sun Studio 12 on Solaris 10 SPARC, I'm getting the following warnings:

"libsmb/async_smb.c", line 40: warning: integer overflow detected: op "<<"
"libsmb/async_smb.c", line 51: warning: integer overflow detected: op "<<"
"libads/ads_status.c", line 81: warning: integer overflow detected: op "<<"

It appears that the following #defines in nt_status.h need to to be casted to the right type:

from
    #define NT_STATUS_DOS_MASK (NT_STATUS_TYPE_DOS << 24)
    #define NT_STATUS_LDAP_MASK (NT_STATUS_TYPE_LDAP << 24)
to
    #define NT_STATUS_DOS_MASK ((uint32_t) NT_STATUS_TYPE_DOS << 24)
    #define NT_STATUS_LDAP_MASK ((uint32_t) NT_STATUS_TYPE_LDAP << 24)
Comment 1 Derrell Lipman 2009-05-03 08:21:52 UTC
reassign