git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Copyright updates:
[exim.git]
/
src
/
src
/
imap_utf7.c
diff --git
a/src/src/imap_utf7.c
b/src/src/imap_utf7.c
index dfa50a9e186e254e84ec89908b8bfd3dbb7e3f40..9d7665971134cfa6f575f7c871ce0a835f090373 100644
(file)
--- a/
src/src/imap_utf7.c
+++ b/
src/src/imap_utf7.c
@@
-1,5
+1,7
@@
-/* Copyright (c) University of Cambridge 2017 */
+/* Copyright (c) The Exim Maintainers 2023 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
/* See the file NOTICE for conditions of use and distribution. */
+/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "exim.h"
#include "exim.h"
@@
-14,7
+16,7
@@
static uschar encode_base64[64] =
size_t slen;
uschar *sptr;
gstring * yield = NULL;
size_t slen;
uschar *sptr;
gstring * yield = NULL;
-int i = 0
, j;
/* compiler quietening */
+int i = 0
;
/* compiler quietening */
uschar c = 0; /* compiler quietening */
BOOL base64mode = FALSE;
BOOL lastsep = FALSE;
uschar c = 0; /* compiler quietening */
BOOL base64mode = FALSE;
BOOL lastsep = FALSE;
@@
-106,7
+108,7
@@
while (slen > 0)
i = 0;
}
i = 0;
}
- for (j = 0; j < 2; j++, s++) switch (i++)
+ for (
int
j = 0; j < 2; j++, s++) switch (i++)
{
case 0:
/* Top 6 bits of the first octet */
{
case 0:
/* Top 6 bits of the first octet */
@@
-199,9
+201,7
@@
iconv_close(icd);
#endif
yield = string_catn(yield, outbuf, outptr - outbuf);
#endif
yield = string_catn(yield, outbuf, outptr - outbuf);
-
-if (yield->s[yield->ptr-1] == '.')
- yield->ptr--;
+gstring_trim_trailing(yield, '.');
return string_from_gstring(yield);
}
return string_from_gstring(yield);
}