Return-Path: Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 80441 invoked by uid 500); 6 Nov 2001 02:10:03 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 80430 invoked from network); 6 Nov 2001 02:10:02 -0000 Message-ID: From: "MATHIHALLI,MADHUSUDAN (HP-Cupertino,ex1)" To: "'dev@httpd.apache.org'" Subject: apr_xlate_conv_buffer Date: Mon, 5 Nov 2001 21:10:00 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, I was just wondering if srclib/apr/i18n/unix/xlate.c : apr_xlate_conv_buffer() is supposed to accept "char *inbuf" or "unsigned char *inbuf".. It's being used differently in lotsa places - and it shows up as a warning when apr_md5.c is being compiled.. Do you guys think it's worth applying this patch ?.. I feel it's safer to do this (it atleast doesn't harm if the buffer actually contains unsigned char data).. Ofcourse, this patch is not complete (it doesn't fully take care of converting all the local buffers in apr_xlate_conf_buffer()).. Thx -Madhu Index: apr_xlate.h =================================================================== RCS file: /home/cvspublic/apr/include/apr_xlate.h,v retrieving revision 1.16 diff -u -r1.16 apr_xlate.h --- apr_xlate.h 2001/08/24 17:55:45 1.16 +++ apr_xlate.h 2001/11/06 01:46:56 @@ -144,9 +144,9 @@ * Output: the amount of the output buffer not yet used */ APR_DECLARE(apr_status_t) apr_xlate_conv_buffer(apr_xlate_t *convset, - const char *inbuf, + const unsigned char *inbuf, apr_size_t *inbytes_left, - char *outbuf, + unsigned char *outbuf, apr_size_t *outbytes_left); /* @see apr_file_io.h the comment in apr_file_io.h about this hack */ Index: xlate.c =================================================================== RCS file: /home/cvspublic/apr/i18n/unix/xlate.c,v retrieving revision 1.23 diff -u -r1.23 xlate.c --- xlate.c 2001/02/25 20:46:49 1.23 +++ xlate.c 2001/11/06 01:47:41 @@ -282,8 +282,10 @@ return APR_SUCCESS; } -apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, const char *inbuf, - apr_size_t *inbytes_left, char *outbuf, +apr_status_t apr_xlate_conv_buffer(apr_xlate_t *convset, + const unsigned char *inbuf, + apr_size_t *inbytes_left, + unsigned char *outbuf, apr_size_t *outbytes_left) { apr_status_t status = APR_SUCCESS;