Article View: gnu.gdb.bug
Article #10192Bug in init_environ in environ.c in version 3.5
From: Lawrence Freil
Date: Tue, 06 Mar 1990 21:50
Date: Tue, 06 Mar 1990 21:50
19 lines
1334 bytes
1334 bytes
In gdb version 3.5 the routine init_environ at line 78 of environ.c,
the bcopy routine is not copying the NULL terminator, and if the
memory returned by malloc is not clear the string remains unterminated
with garbage at the end. The problem was encountered on Interactive 386/ix
but the problem is in all versions.
The following is a diff of the modified version against the origonal.
File: environ.c
78c78
< bcopy (e->vector[i], new, len+1);
---
> bcopy (e->vector[i], new, len);
--------
Lawrence Freil Usenet/DDN:lef@dogwood.atl.ga.us
National Science Center Foundation Phone:(404)-828-8459
P.O. Box 1648
Augusta, Ga 30903
Technical Details
Message-ID:
<1990Mar6.215029.17260@dogwood.atl.ga.us>Path:
arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!snorkelwacker!apple!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!uwm.edu!cs.utexas.edu!asuvax!ncar!mephisto!gatech!dogwood!lefShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f5053,aa19920cdb854bce,start X-Google-Attributes: gidf5053,public X-Google-ArrivalTime: 1990-03-06 13:50:29 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!bu.edu!snorkelwacker!apple!brutus.cs.uiuc.edu!zaphod.mps.ohio-state.edu!uwm.edu!cs.utexas.edu!asuvax!ncar!mephisto!gatech!dogwood!lef From: lef@dogwood.atl.ga.us (Lawrence Freil) Newsgroups: gnu.gdb.bug Subject: Bug in init_environ in environ.c in version 3.5 Message-ID: <1990Mar6.215029.17260@dogwood.atl.ga.us> Date: 6 Mar 90 21:50:29 GMT Organization: National Science Center Foundation Lines: 19 Posted: Tue Mar 6 22:50:29 1990