From: Eric S. Raymond Date: Tue, 9 Mar 2004 15:16:47 +0000 (+0000) Subject: Deal with apparent C library bug. X-Git-Tag: 2.4~17 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=2827ec55b6a91badba0cc15eeb74f0dedb140690;p=comparator.git Deal with apparent C library bug. --- diff --git a/linebyline.c b/linebyline.c index 855c071..795b9ce 100644 --- a/linebyline.c +++ b/linebyline.c @@ -75,7 +75,7 @@ int analyzer_init(unsigned char *buf) exit(1); } - cp = strtok(buf, ", "); + cp = strtok(strdup(buf), ", "); if (strcmp(cp, "line-oriented")) return(1); while (cp = strtok(NULL, ", "))