X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Frfc2047.c;h=5c987e292f2f53f50bc8e06015eac4e9a73631d3;hb=65de12cc1acfeeacf85c3fd77d244b9dc7e79bdc;hp=949fafd6971e69b00da1ac5e6b2fb32ac79676ad;hpb=d7d7b7b91dd75cec636fc144da7e27eed860f971;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/rfc2047.c b/src/src/rfc2047.c index 949fafd69..5c987e292 100644 --- a/src/src/rfc2047.c +++ b/src/src/rfc2047.c @@ -1,10 +1,8 @@ -/* $Cambridge: exim/src/src/rfc2047.c,v 1.3 2006/02/07 11:19:00 ph10 Exp $ */ - /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2006 */ +/* Copyright (c) University of Cambridge 1995 - 2015 */ /* See the file NOTICE for conditions of use and distribution. */ /* This file contains a function for decoding message header lines that may @@ -122,7 +120,7 @@ for (;; string = mimeword + 2) encoding = toupper((*q1ptr)[1]); **endptr = 0; if (encoding == 'B') - dlen = auth_b64decode(*q2ptr+1, dptrptr); + dlen = b64decode(*q2ptr+1, dptrptr); else if (encoding == 'Q') dlen = rfc2047_qpdecode(*q2ptr+1, dptrptr); **endptr = '?'; /* restore */ @@ -220,7 +218,7 @@ while (mimeword != NULL) #endif if (mimeword != string) - yield = string_cat(yield, &size, &ptr, string, mimeword - string); + yield = string_catn(yield, &size, &ptr, string, mimeword - string); /* Do a charset translation if required. This is supported only on hosts that have the iconv() function. Translation errors set error, but carry on, @@ -279,7 +277,7 @@ while (mimeword != NULL) else { DEBUG(D_any) debug_printf("iconv error translating \"%.*s\" to %s: " - "%s\n", endword + 2 - mimeword, mimeword, target, strerror(errno)); + "%s\n", (int)(endword + 2 - mimeword), mimeword, target, strerror(errno)); } } @@ -307,7 +305,7 @@ while (mimeword != NULL) /* Add the new string onto the result */ - yield = string_cat(yield, &size, &ptr, tptr, tlen); + yield = string_catn(yield, &size, &ptr, tptr, tlen); } #if HAVE_ICONV @@ -330,7 +328,7 @@ while (mimeword != NULL) /* Copy the remaining characters of the string, zero-terminate it, and return the length as well if requested. */ -yield = string_cat(yield, &size, &ptr, string, Ustrlen(string)); +yield = string_cat(yield, &size, &ptr, string); yield[ptr] = 0; if (lenptr != NULL) *lenptr = ptr; if (sizeptr != NULL) *sizeptr = size;