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/ap ap_base64.c ap_sha1.c
Date Wed, 24 May 2000 17:19:12 GMT
trawick     00/05/24 10:19:11

  Modified:    src/ap   ap_base64.c ap_sha1.c
  Log:
  EBCDIC: Fail the setup of EBCDIC translation tables in sha1 and base64
  code if the translation handle passed in is not for a single-byte
  translation.
  
  Revision  Changes    Path
  1.9       +17 -0     apache-2.0/src/ap/ap_base64.c
  
  Index: ap_base64.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_base64.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ap_base64.c	2000/05/16 03:11:09	1.8
  +++ ap_base64.c	2000/05/24 17:19:10	1.9
  @@ -120,7 +120,24 @@
       int i;
       ap_size_t inbytes_left, outbytes_left;
       ap_status_t rv;
  +    int onoff;
       
  +    /* Only single-byte conversion is supported.
  +     */
  +    rv = ap_xlate_get_sb(to_ascii, &onoff);
  +    if (rv) {
  +        return rv;
  +    }
  +    if (!onoff) { /* If conversion is not single-byte-only */
  +        return APR_EINVAL;
  +    }
  +    rv = ap_xlate_get_sb(to_ebcdic, &onoff);
  +    if (rv) {
  +        return rv;
  +    }
  +    if (!onoff) { /* If conversion is not single-byte-only */
  +        return APR_EINVAL;
  +    }
       xlate_to_ebcdic = to_ebcdic;
       for (i = 0; i < sizeof(os_toascii); i++) {
           os_toascii[i] = i;
  
  
  
  1.9       +12 -0     apache-2.0/src/ap/ap_sha1.c
  
  Index: ap_sha1.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_sha1.c,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- ap_sha1.c	2000/05/16 19:48:07	1.8
  +++ ap_sha1.c	2000/05/24 17:19:10	1.9
  @@ -123,6 +123,18 @@
   
   API_EXPORT(ap_status_t) ap_SHA1InitEBCDIC(ap_xlate_t *x)
   {
  +    ap_status_t rv;
  +    int onoff;
  +
  +    /* Only single-byte conversion is supported.
  +     */
  +    rv = ap_xlate_get_sb(x, &onoff);
  +    if (rv) {
  +        return rv;
  +    }
  +    if (!onoff) { /* If conversion is not single-byte-only */
  +        return APR_EINVAL;
  +    }
       ebcdic2ascii_xlate = x;
       return APR_SUCCESS;
   }
  
  
  

Mime
View raw message