Bug 152039 - pam_smb-2.0.0rc6-7: 3 * array subscript out of range
Summary: pam_smb-2.0.0rc6-7: 3 * array subscript out of range
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: unspecified
Hardware: All SuSE Linux 10.1
: P5 - None : Normal
Target Milestone: ---
Assignee: Petr Ostadal
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-18 12:28 UTC by David Binderman
Modified: 2006-02-20 14:56 UTC (History)
0 users

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2006-02-18 12:28:36 UTC
I just tried to compile package pam_smb-2.0.0rc6-7 with the Intel C compiler.

It said

1.

pam_read_conf.c(59): warning #175: subscript out of range

The source code is

	pamsmb_dlist->controllers[0].domain[MAX_SERV_LEN]='\0';

but 

linux:/usr/src/packages/SPECS # find ../BUILD/pam_smb-2.0.0-rc6/ -name \*.h -print | xargs fgrep "domain["
../BUILD/pam_smb-2.0.0-rc6/include/cache.h:  char domain[MAX_NTDOM_LEN];
../BUILD/pam_smb-2.0.0-rc6/include/pam_smb_queue.h:  char domain[MAX_NTDOM_LEN];

and

linux:/usr/src/packages/SPECS # find ../BUILD/pam_smb-2.0.0-rc6/ -name \*.h -print | xargs grep "define.*MAX_NTDOM_LEN"
../BUILD/pam_smb-2.0.0-rc6/include/constants.h:#define MAX_NTDOM_LEN 32

linux:/usr/src/packages/SPECS # find ../BUILD/pam_smb-2.0.0-rc6/ -name \*.h -print | xargs grep "define.*MAX_SERV_LEN"
../BUILD/pam_smb-2.0.0-rc6/include/constants.h:#define MAX_SERV_LEN 64

So we can see that the program is trying to index 64 into an array of size 32.

Suggest code rework.

2.

pam_read_conf.c(64): warning #175: subscript out of range
pam_read_conf.c(69): warning #175: subscript out of range

Duplicates.
Comment 1 Petr Ostadal 2006-02-20 14:56:58 UTC
fixed and submited to STABLE