bug in strdup

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

bug in strdup

Victor Liu-2
In the strdup implementation provided when HAVE_STRDUP is not defined, I
believe there is a problem when an empty string is passed in. The check
for *s == 0 makes it not duplicate the string.

-Victor

_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel
Reply | Threaded
Open this post in threaded view
|

Re: bug in strdup

Martin Hedenfalk-4
On Wed, Jun 02, 2010 at 09:16:51PM -0700, Victor Liu wrote:
> In the strdup implementation provided when HAVE_STRDUP is not
> defined, I believe there is a problem when an empty string is passed
> in. The check for *s == 0 makes it not duplicate the string.

fixed, thanks

        -martin


_______________________________________________
Confuse-devel mailing list
[hidden email]
http://lists.nongnu.org/mailman/listinfo/confuse-devel