trawick 01/11/19 03:11:37
Modified: passwd apr_md5.c
Log:
apr md5 and apr xlate have different APIs w.r.t. the buffers they
operate on, so fix it up at the interface between them to avoid
unnecessary warnings
Revision Changes Path
1.16 +10 -6 apr/passwd/apr_md5.c
Index: apr_md5.c
===================================================================
RCS file: /home/cvs/apr/passwd/apr_md5.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- apr_md5.c 2001/08/06 15:46:04 1.15
+++ apr_md5.c 2001/11/19 11:11:37 1.16
@@ -272,8 +272,10 @@
if (inputLen >= partLen) {
if (context->xlate) {
inbytes_left = outbytes_left = partLen;
- apr_xlate_conv_buffer(context->xlate, input, &inbytes_left,
- &context->buffer[idx], &outbytes_left);
+ apr_xlate_conv_buffer(context->xlate, (const char *)input,
+ &inbytes_left,
+ (char *)&context->buffer[idx],
+ &outbytes_left);
}
else {
memcpy(&context->buffer[idx], input, partLen);
@@ -284,8 +286,9 @@
if (context->xlate) {
unsigned char inp_tmp[64];
inbytes_left = outbytes_left = 64;
- apr_xlate_conv_buffer(context->xlate, &input[i],
&inbytes_left,
- inp_tmp, &outbytes_left);
+ apr_xlate_conv_buffer(context->xlate, (const char
*)&input[i],
+ &inbytes_left, (char *)inp_tmp,
+ &outbytes_left);
MD5Transform(context->state, inp_tmp);
}
else {
@@ -301,8 +304,9 @@
/* Buffer remaining input */
if (context->xlate) {
inbytes_left = outbytes_left = inputLen - i;
- apr_xlate_conv_buffer(context->xlate, &input[i], &inbytes_left,
- &context->buffer[idx], &outbytes_left);
+ apr_xlate_conv_buffer(context->xlate, (const char *)&input[i],
+ &inbytes_left, (char *)&context->buffer[idx],
+ &outbytes_left);
}
else {
memcpy(&context->buffer[idx], &input[i], inputLen - i);