[patch] External parser parse bug

Jim <[email protected]> Mon, 23 May 2005 00:07:13 -0600 (MDT)
Newsgroups gmane.comp.web.htdig.devel
Message-ID <[email protected]>
This patch corrects a command parsing bug in ExternalParser.cc. The
single argument StringList constructor only considers a tab to be a
valid separator. As such a space between a command and argument (e.g.
"convert.pl -x") is not treated as a separator, and the string is not
split properly. This results in execv calling a command that generally
doesn't exist (e.g. "convert.pl -x" rather than convert.pl).

--- htdig/orig_ExternalParser.cc	2005-05-22 23:05:18.798550988 -0600
+++ htdig/ExternalParser.cc	2005-05-22 23:05:43.890983352 -0600
@@ -227,7 +227,7 @@ ExternalParser::parse(Retriever &retriev
      int		get_file = (convertToType.length() != 0);
      String	newcontent;

-    StringList	cpargs(currentParser);
+    StringList	cpargs(currentParser, " \t");
      char   **parsargs = new char * [cpargs.Count() + 5];
      int    argi;
      for (argi = 0; argi < cpargs.Count(); argi++)


-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
ht://Dig Developer mailing list:
[email protected]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev