Bug 133610 - nut-2.0.2-3: 2 * array subscript out of range
Summary: nut-2.0.2-3: 2 * array subscript out of range
Status: RESOLVED FIXED
Alias: None
Product: SUSE LINUX 10.0
Classification: openSUSE
Component: Basesystem (show other bugs)
Version: Final
Hardware: All SUSE Other
: P5 - None : Minor
Target Milestone: ---
Assignee: Michal Marek
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-13 16:20 UTC by David Binderman
Modified: 2006-02-20 14:23 UTC (History)
1 user (show)

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 2005-11-13 16:20:14 UTC
I just tried to compile package nut-2.0.2-3 with a non standard
version of the GNU C compiler.

It said

1.

bestfcom.c:530: warning: array subscript out of range

The source code is

	rstring[sizeof(rstring)] = '\0';

Clearly broken code. Suggest new code

	rstring[ sizeof(rstring) - 1] = '\0';

2.

tripplite.c:147: warning: array subscript out of range

The source code is

        char buf[32];
        buf[32] = '\0';

Clearly broken code. Suggest new code

        buf[31] = '\0';

It would also appear that the mail address of the author [ rkroll@exploits.org ]
seems broken.
Comment 1 Michal Marek 2006-02-20 14:23:08 UTC
Fixed (the secong bug also appeared in the file tripplite_usb.c btw).