httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@locus.apache.org
Subject cvs commit: apache-2.0/src/main rfc1413.c
Date Wed, 08 Nov 2000 16:42:15 GMT
trawick     00/11/08 08:42:11

  Modified:    src/main rfc1413.c
  Log:
  Fix the format strings used for apr_port_t (APR_PORT_T_FMT anyone?).
  The sscanf() call was actually broken.
  
  Revision  Changes    Path
  1.27      +2 -2      apache-2.0/src/main/rfc1413.c
  
  Index: rfc1413.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/rfc1413.c,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- rfc1413.c	2000/11/08 14:47:30	1.26
  +++ rfc1413.c	2000/11/08 16:42:05	1.27
  @@ -151,7 +151,7 @@
       apr_get_port(&sav_rmt_port, APR_REMOTE, sock);
   
   /* send the data */
  -    buflen = apr_snprintf(buffer, sizeof(buffer), "%u,%u\r\n", sav_rmt_port,
  +    buflen = apr_snprintf(buffer, sizeof(buffer), "%hu,%hu\r\n", sav_rmt_port,
   		sav_our_port);
       ap_xlate_proto_to_ascii(buffer, buflen);
   
  @@ -203,7 +203,7 @@
   
   /* RFC1413_USERLEN = 512 */
       ap_xlate_proto_from_ascii(buffer, i);
  -    if (sscanf(buffer, "%u , %u : USERID :%*[^:]:%512s", &rmt_port, &our_port,
  +    if (sscanf(buffer, "%hu , %hu : USERID :%*[^:]:%512s", &rmt_port, &our_port,
   	       user) != 3 || sav_rmt_port != rmt_port
   	|| sav_our_port != our_port)
   	return -1;
  
  
  

Mime
View raw message