You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apreq-cvs@httpd.apache.org by jo...@apache.org on 2003/12/11 17:15:34 UTC

cvs commit: httpd-apreq-2/src apreq_params.c

joes        2003/12/11 08:15:34

  Modified:    src      apreq_params.c
  Log:
  Apply Max Kellerman's fix for segfault caused by invalid escape sequence in the query string. Some minor changes to Max Kellermann's original patch: apreq_decode_param always returns a non-NULL param, so we can eliminate the original 'if (param)' test.
  
  Revision  Changes    Path
  1.36      +3 -4      httpd-apreq-2/src/apreq_params.c
  
  Index: apreq_params.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq-2/src/apreq_params.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- apreq_params.c	13 Oct 2003 18:24:47 -0000	1.35
  +++ apreq_params.c	11 Dec 2003 16:15:34 -0000	1.36
  @@ -275,11 +275,10 @@
                       vlen = qs - start - nlen - 1;
   
                   param = apreq_decode_param(pool, start, nlen, vlen);
  +                if (param->v.status != APR_SUCCESS)
  +                    return param->v.status;
   
  -                if (param)
  -                    apr_table_addn(t, param->v.name, param->v.data);
  -                else
  -                    return APR_BADARG;
  +                apr_table_addn(t, param->v.name, param->v.data);
               }
   
               if (*qs == 0)