Bug 6166 - Integer overflow detected in nt_status.h
Summary: Integer overflow detected in nt_status.h
Status: RESOLVED WORKSFORME
Alias: None
Product: Samba 3.3
Classification: Unclassified
Component: File services (show other bugs)
Version: 3.3.1
Hardware: Sparc Solaris
: P3 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-05 14:26 UTC by John Center
Modified: 2020-12-22 00:30 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
Comment 2 Björn Jacke 2020-12-22 00:30:41 UTC
please retest with a recent samba release and eventually, reopen this issue and ideally provide a patch :-)