Bug 169996 - bash multibyte patch has bad memory allocation
bash multibyte patch has bad memory allocation
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Tim Waugh
Ben Levenson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-10-06 06:51 EDT by Michael K Johnson
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: 3.0-35
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-10-06 06:59:22 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 Michael K Johnson 2005-10-06 06:51:01 EDT
The bash multibyte patch has an obvious memory allocation error:

@@ -69,7 +69,7 @@
 +                size_t len = mbstowcs (wcharlist, charlist, 0);
 +                if (len == -1)
 +                  len = 0;
-+                wcharlist = xmalloc (1 + sizeof (wchar_t) * len);
++                wcharlist = xmalloc (sizeof (wchar_t) * (len + 1));
 +                mbstowcs (wcharlist, charlist, 1 + len);
 +              }
 +
Comment 1 Tim Waugh 2005-10-06 06:59:22 EDT
Thanks.  Fixed package building.

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