[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #24683] -[NSString intValue] fails if string contains >31 leading w
From: |
Larry Campbell |
Subject: |
[bug #24683] -[NSString intValue] fails if string contains >31 leading whitespace characters |
Date: |
Tue, 28 Oct 2008 18:07:38 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1 |
URL:
<http://savannah.gnu.org/bugs/?24683>
Summary: -[NSString intValue] fails if string contains >31
leading whitespace characters
Project: GNUstep
Submitted by: lcampbel
Submitted on: Tue 28 Oct 2008 06:07:36 PM GMT
Category: Base/Foundation
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
Due to this lossage in GSString.m (intValue_c, and similarly for
intValue_u):
unsigned len = self->_count < 32 ? self->_count : 31;
char buf[len+1];
memcpy(buf, self->_contents.c, len);
buf[len] = '\0';
return atol((const char*)buf);
If the string contains more than 31 leading whitespace characters, zero is
returned instead of the correct value.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?24683>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bug #24683] -[NSString intValue] fails if string contains >31 leading whitespace characters,
Larry Campbell <=