You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by jo...@apache.org on 2002/11/28 09:35:26 UTC

cvs commit: apr/test testpoll.c

jorton      2002/11/28 00:35:26

  Modified:    test     testpoll.c
  Log:
  Ensure that buffers passed to strcmp are NUL-terminated.
  
  Revision  Changes    Path
  1.22      +1 -1      apr/test/testpoll.c
  
  Index: testpoll.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testpoll.c,v
  retrieving revision 1.21
  retrieving revision 1.22
  diff -u -r1.21 -r1.22
  --- testpoll.c	27 Nov 2002 05:41:52 -0000	1.21
  +++ testpoll.c	28 Nov 2002 08:35:26 -0000	1.22
  @@ -121,7 +121,7 @@
                        CuTest *tc)
   {
       apr_size_t buflen = 5;
  -    char *buffer = apr_pcalloc(p, sizeof(char) * buflen);
  +    char *buffer = apr_pcalloc(p, sizeof(char) * (buflen + 1));
       apr_sockaddr_t *recsa;
       apr_status_t rv;