[Bug 515559] New: nss-ldapd-0.6.8-1.6: possible off by one error
http://bugzilla.novell.com/show_bug.cgi?id=515559 Summary: nss-ldapd-0.6.8-1.6: possible off by one error Classification: openSUSE Product: openSUSE 11.2 Version: Factory Platform: All OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: dcb314@hotmail.com QAContact: qa@suse.de Found By: --- I just tried to compile factory package nss-ldapd-0.6.8-1.6 The compiler said passwd.c:347:11: warning: array subscript is above array bounds The source code is for (numuids=0;(numuids<=MAXUIDS_PER_ENTRY)&&(tmpvalues[numuids]!=NULL);numuids++) { uids[numuids]=(uid_t)strtol(tmpvalues[numuids],&tmp,0); so numuids can have the value MAXUIDS_PER_ENTRY. But uid_t uids[MAXUIDS_PER_ENTRY]; Hence the compiler complain. Suggest code rework. Maybe for (numuids=0;(numuids < MAXUIDS_PER_ENTRY)&&(tmpvalues[numuids]!=NULL);numuids++) would be enough. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=515559
Marcus Meissner
http://bugzilla.novell.com/show_bug.cgi?id=515559
Ralf Haferkamp
http://bugzilla.novell.com/show_bug.cgi?id=515559
User rhafer@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=515559#c1
Ralf Haferkamp
http://bugzilla.novell.com/show_bug.cgi?id=515559
User rhafer@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=515559#c2
Ralf Haferkamp
http://bugzilla.novell.com/show_bug.cgi?id=515559
User rhafer@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=515559#c3
Ralf Haferkamp
http://bugzilla.novell.com/show_bug.cgi?id=515559
User dcb314@hotmail.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=515559#c4
David Binderman
BTW, which compiler flags did you use to get those warnings? I don't see them, even when using -Warray-bounds.
You should be able to see them. Perhaps -Wall or -Wextra might help. I used an development snapshot compiler, so it is possible that the warnings I can see might be slightly different to the standard set. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
http://bugzilla.novell.com/show_bug.cgi?id=515559
Ralf Haferkamp
http://bugzilla.novell.com/show_bug.cgi?id=515559
User rhafer@novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=515559#c5
Ralf Haferkamp
participants (1)
-
bugzilla_noreply@novell.com