httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/server/mpm/winnt registry.c
Date Sat, 25 May 2002 20:06:32 GMT
wrowe       02/05/25 13:06:32

  Modified:    server/mpm/winnt registry.c
  Log:
    Small chance we have an unterminated or single null terminated list.
    Simple workaround to protect our sizing functions from walking past
    the end of allocation.
  
  Revision  Changes    Path
  1.35      +7 -1      httpd-2.0/server/mpm/winnt/registry.c
  
  Index: registry.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/server/mpm/winnt/registry.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- registry.c	25 May 2002 20:02:16 -0000	1.34
  +++ registry.c	25 May 2002 20:06:32 -0000	1.35
  @@ -258,7 +258,13 @@
       }
       else 
       {
  -        pValue = apr_palloc(p, nSize);
  +        /* Small possiblity the array is either unterminated 
  +         * or single NULL terminated.  Avert.
  +         */
  +        pValue = apr_palloc(p, nSize + 2);
  +        pValue[nSize + 1] = '\0';
  +        pValue[nSize] = '\0';
  +        
           rv = RegQueryValueEx(hKey, 
   			     name,		/* key name */
   			     NULL,		/* reserved */
  
  
  

Mime
View raw message