apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject cvs commit: apr/test testfile.c
Date Wed, 27 Nov 2002 11:54:50 GMT
jorton      2002/11/27 03:54:50

  Modified:    test     testfile.c
  Log:
  Ensure that strings passed to strcmp() are NUL-terminated.
  
  Revision  Changes    Path
  1.58      +2 -2      apr/test/testfile.c
  
  Index: testfile.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testfile.c,v
  retrieving revision 1.57
  retrieving revision 1.58
  diff -u -r1.57 -r1.58
  --- testfile.c	24 Nov 2002 05:11:45 -0000	1.57
  +++ testfile.c	27 Nov 2002 11:54:50 -0000	1.58
  @@ -123,7 +123,7 @@
   {
       apr_status_t rv;
       apr_size_t nbytes = 256;
  -    char *str = apr_palloc(p, nbytes + 1);
  +    char *str = apr_pcalloc(p, nbytes + 1);
       
       rv = apr_file_read(filetest, str, &nbytes);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
  @@ -215,7 +215,7 @@
       apr_status_t rv;
       apr_off_t offset = 5;
       apr_size_t nbytes = 256;
  -    char *str = apr_palloc(p, nbytes + 1);
  +    char *str = apr_pcalloc(p, nbytes + 1);
   
       rv = apr_file_seek(filetest, SEEK_SET, &offset);
       CuAssertIntEquals(tc, APR_SUCCESS, rv);
  
  
  

Mime
View raw message