httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@hyperreal.org
Subject cvs commit: apache-2.0/src/lib/apr/file_io/os2 readwrite.c
Date Tue, 19 Oct 1999 01:59:49 GMT
bjh         99/10/18 18:59:49

  Modified:    src/lib/apr/file_io/os2 readwrite.c
  Log:
  OS/2: ap_fgets() should NULL terminate the string.
  
  Revision  Changes    Path
  1.4       +2 -1      apache-2.0/src/lib/apr/file_io/os2/readwrite.c
  
  Index: readwrite.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/os2/readwrite.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- readwrite.c	1999/10/18 10:23:21	1.3
  +++ readwrite.c	1999/10/19 01:59:48	1.4
  @@ -224,7 +224,7 @@
       ap_status_t rv;
       int i;    
   
  -    for (i = 0; i < len; i++) {
  +    for (i = 0; i < len-1; i++) {
           readlen = 1;
           rv = ap_read(thefile, str+i, &readlen);
           
  @@ -237,6 +237,7 @@
           else if (str[i] == '\n')
               break;
       }
  +    str[i] = 0;
       return APR_SUCCESS; 
   }
   
  
  
  

Mime
View raw message