Bug 169996 - bash multibyte patch has bad memory allocation
Summary: bash multibyte patch has bad memory allocation
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact: Ben Levenson
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-10-06 10:51 UTC by Michael K Johnson
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version: 3.0-35
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-06 10:59:22 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael K Johnson 2005-10-06 10:51:01 UTC
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 10:59:22 UTC
Thanks.  Fixed package building.


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