bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: strsep bug


From: Yoann Vandoorselaere
Subject: Re: strsep bug
Date: Tue, 06 Feb 2007 12:24:27 +0100

Le mardi 06 février 2007 à 01:46 +0100, Bruno Haible a écrit :
> Hi Yoann,
> 
> The strsep replacement has a bug: when passed an empty set of delimiters,
> according to the Linux and BSD manual page the token should be set to
> the entire string, and *stringp should be set to NULL (so indicating there
> are no more tokens). The implementation in gnulib sets *stringp to the end
> of the string, so that strsep will repeatedly, infinitely, yield empty
> tokens.
> 
> Here is a fix, together with an optimization of the length 1 case.
> 
> OK to apply?

Hi Bruno,

The patch look good, please apply.

Thanks,

-- 
Yoann Vandoorselaere <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]