Bug 14465 - vipw depends upon malloc() returning zero-filled memory
Summary: vipw depends upon malloc() returning zero-filled memory
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 3.3-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: Sheldon Hearn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-10-23 14:47 UTC by fanf
Modified: 1999-10-25 10:51 UTC (History)
0 users

See Also:


Attachments
file.diff (538 bytes, patch)
1999-10-23 14:47 UTC, fanf
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fanf 1999-10-23 14:47:19 UTC
If vipw is invoked like `vipw -d /some/directory/not/ending/in/slash`
then it replaces the terminating '\0' with '/' before calling strcat.
This would cause heap corruption if malloc() didn't happen to return a
block of zeroes.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 1999-10-25 10:40:24 UTC
Responsible Changed
From-To: freebsd-bugs->sheldonh

I'll take this one, since I introduced the offending code. 
Comment 2 Sheldon Hearn freebsd_committer freebsd_triage 1999-10-25 10:51:03 UTC
State Changed
From-To: open->closed

Committed as rev 1.11 (HEAD) and rev 1.5.2.6 (RELENG_3). Thanks!