Bug 178941 - Memory corruption in dos2unix
Memory corruption in dos2unix
Status: CLOSED DUPLICATE of bug 174016
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: dos2unix (Show other bugs)
4.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-01-25 12:02 EST by H.J. Lu
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-01-25 12:23:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A patch (453 bytes, patch)
2006-01-25 12:02 EST, H.J. Lu
no flags Details | Diff

  None (edit)
Description H.J. Lu 2006-01-25 12:02:17 EST
dos2unix has

  fname_len = strlen(dir) + strlen("/d2utmpXXXXXX");
  if (!(fname_str = malloc(fname_len)))
    goto make_failed;
  sprintf(fname_str, "%s%s", dir, "/d2utmpXXXXXX");

It forgot the trailing '\0' when mallocing memory. I am attaching a patch.
Comment 1 H.J. Lu 2006-01-25 12:02:17 EST
Created attachment 123680 [details]
A patch
Comment 2 Tim Waugh 2006-01-25 12:23:39 EST
Changed product to 'Red Hat Enterprise Linux' (from '... Beta').

Marked as duplicate.

*** This bug has been marked as a duplicate of 174016 ***

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