httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Schaefer <joe+gm...@sunstarsys.com>
Subject Re: small bug in string unescaping
Date Fri, 18 Jul 2003 14:24:56 GMT
Graham Clark <gcla@dcs.ed.ac.uk> writes:

> Folks, here's a small patch which I hope fixes a problem in
> libapreq2's string unescaping. If the source and destination strings
> are represented by the same pointer - e.g. if called as
> apreq_unescape(s) - string s is modified incorrectly in general.
> 
> Graham
> 
> Index: src/apreq.c
> ===================================================================
> RCS file: /home/cvspublic/httpd-apreq-2/src/apreq.c,v
> retrieving revision 1.24
> diff -u -r1.24 apreq.c
> --- src/apreq.c	30 Jun 2003 20:42:14 -0000	1.24
> +++ src/apreq.c	18 Jul 2003 13:33:48 -0000
> @@ -333,6 +333,7 @@
>              else if (*s == 0)
>                  return s - (const char *)d;
>          }
> +	 d = s;
>      }
>  
>      for (; s < end; ++d, ++s) {
> 

Thanks Graham!  The patch looks good, but I'd also like to see
a patch to t/params.c that 

  1) tickles the bug in current cvs,
  2) demonstrates that this patch fixes it.

This is exactly the sort of bug our test framework needs to
expose.  If you need any help writing the test, please don't 
hesitate to ask.

-- 
Joe Schaefer


Mime
View raw message