mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 08:41:03 +00:00
Fix leaks and a possible buffer overrun
This commit is contained in:
parent
5b46efa8cd
commit
0fb9739f21
4 changed files with 14 additions and 5 deletions
|
@ -1770,7 +1770,13 @@ NSDictionary *locale)
|
|||
|
||||
if (-1 == prec)
|
||||
{
|
||||
len = strlen(str); // Number of bytes to convert.
|
||||
/* Find end of string, within the specified limit.
|
||||
*/
|
||||
len = 0;
|
||||
while (str[len] != '\0' && len < width)
|
||||
{
|
||||
len++;
|
||||
}
|
||||
blen = len; // Size of unichar output buffer.
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue