[uClibc 0001394]: strsep broken in 0.9.29, works fine in 0.9.28.3 and earlier
bugs at busybox.net
bugs at busybox.net
Sat Sep 15 08:49:11 UTC 2007
The following issue has been CLOSED
======================================================================
http://busybox.net/bugs/view.php?id=1394
======================================================================
Reported By: ahoying
Assigned To: uClibc
======================================================================
Project: uClibc
Issue ID: 1394
Category: Other
Reproducibility: always
Severity: minor
Priority: normal
Status: closed
Resolution: unable to reproduce
Fixed in Version:
======================================================================
Date Submitted: 06-16-2007 18:22 PDT
Last Modified: 09-15-2007 01:49 PDT
======================================================================
Summary: strsep broken in 0.9.29, works fine in 0.9.28.3 and
earlier
Description:
The changes made to the strsep code have caused it, in my application, to
not return NULL after it hits the last token. For instance the following
code will loop forever, continuously returning the last token (1 in the
example) once it has walked through the string:
copyptr = "2:45:29:325:0:TEST:1"; // Just an example
while ( (token[i] = strsep(©ptr, ":")) > 0 )
{
...
}
======================================================================
----------------------------------------------------------------------
vapier - 09-15-07 01:49
----------------------------------------------------------------------
i'm unable to reproduce this on x86_64 or i386 (tried both arch-optimized
and generic ones)
test case is simple:
char one[50];
char *cp, *ptr;
cp = strcpy(one, "2:45:29:325:0:TEST:1");
while ((ptr = strsep(&cp, ":")) > 0)
printf("ptr = %s\n", ptr);
and i get:
ptr = 2
ptr = 45
ptr = 29
ptr = 325
ptr = 0
ptr = TEST
ptr = 1
you'll have to build with debug enabled and throw it through gdb ...
Issue History
Date Modified Username Field Change
======================================================================
06-16-07 18:22 ahoying New Issue
06-16-07 18:22 ahoying Status new => assigned
06-16-07 18:22 ahoying Assigned To => uClibc
09-15-07 01:49 vapier Note Added: 0002744
09-15-07 01:49 vapier Status assigned => closed
09-15-07 01:49 vapier Resolution open => unable to
reproduce
09-15-07 01:49 vapier Description Updated
09-15-07 01:49 vapier Additional Information Updated
======================================================================
More information about the uClibc-cvs
mailing list