Bug 110770 - off by one error accessing array
off by one error accessing array
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: minicom (Show other bugs)
1
All Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
Brock Organ
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-11-24 10:26 EST by d.binderman
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version: 2.00.0-20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-20 16:14:17 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description d.binderman 2003-11-24 10:26:14 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:

I just tried to compile package minicom-2_00_0-17 from Fedora.

The compiler said

1.

util.c(298): warning #175: subscript out of range
util.c(310): warning #175: subscript out of range

The source code is

  static char next_port[PARS_VAL_LEN];
  static char loc_port_list[PARS_VAL_LEN];

  loc_port_list[PARS_VAL_LEN] = (char) 0;
  next_port[PARS_VAL_LEN] = (char) 0;

Suggest

  loc_port_list[ PARS_VAL_LEN - 1] = (char) 0;
  next_port[ PARS_VAL_LEN - 1] = (char) 0;

might be better code.



Version-Release number of selected component (if applicable):
minicom-2_00_0-17 

How reproducible:
Always

Steps to Reproduce:
1. by inspection
2.
3.
    

Additional info:
Comment 1 David Binderman 2004-11-05 14:40:49 EST
I can confirm that this bug still exits in Fedora Core 3
Test 3.

It seems that it hasn't been fixed in nearly a year.

Note You need to log in before you can comment on or make changes to this bug.