httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject RE: I WANT A GA release
Date Fri, 05 Apr 2002 18:43:19 GMT
At 11:22 AM -0700 4/5/02, Brad Nicholes wrote:
>I'm still seeing a problem with apr_tokenize_to_argv() that causes the
>parser to run off the end string.  I know this causes a fault on
>NetWare, but since I don't understand this code completely and the
>comments about allowing for a NULL argument are confusing, I was hoping
>someone would confirm or deny the problem.
>
>   It appears that apr_tokenize_to_argv() is running off the end of
>the
>string in the following while loop:
>
>while (*ct != '\0') {
>       CHECK_QUOTATION(ct, isquoted);
>       DETERMINE_NEXTSTRING(ct, isquoted);
>       ct++;
>       numargs++;
>       SKIP_WHITESPACE(ct);
>}
>
>Given the null terminated string
>
>     vol2:/apache20/bin/rotlogs.nlm vol2:/apache/logs 2000
>

Hmmm... Since the code must be able to handle an unknown number
of null terminated strings, I think that there's always 2 NULLs marking
the end of the argument list. eg:

   "string1\0" "string2\0" "\0"

But I agree I don't see where that extra NULL is being added to the
original argument :/
-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

Mime
View raw message