projects
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge from master into 4.next
[exim.git]
/
src
/
src
/
lookups
/
lf_quote.c
diff --git
a/src/src/lookups/lf_quote.c
b/src/src/lookups/lf_quote.c
index 60c0a760c63c5ca6bc75777c46124b468b832325..2a76756e9cf417c2febeec6456424ae2fc12488a 100644
(file)
--- a/
src/src/lookups/lf_quote.c
+++ b/
src/src/lookups/lf_quote.c
@@
-37,7
+37,11
@@
result = string_append(result, asize, aoffset, 2, name, US"=");
/* NULL is handled as an empty string */
/* NULL is handled as an empty string */
-if (value == NULL) value = US"";
+if (!value)
+ {
+ value = US"";
+ vlength = 0;
+ }
/* Quote the value if it is empty, contains white space, or starts with a quote
character. */
/* Quote the value if it is empty, contains white space, or starts with a quote
character. */
@@
-45,21
+49,19
@@
character. */
if (value[0] == 0 || Ustrpbrk(value, " \t\n\r") != NULL || value[0] == '\"')
{
int j;
if (value[0] == 0 || Ustrpbrk(value, " \t\n\r") != NULL || value[0] == '\"')
{
int j;
- result = string_cat(result, asize, aoffset, US"\"", 1);
+ result = string_cat
n
(result, asize, aoffset, US"\"", 1);
for (j = 0; j < vlength; j++)
{
if (value[j] == '\"' || value[j] == '\\')
for (j = 0; j < vlength; j++)
{
if (value[j] == '\"' || value[j] == '\\')
- result = string_cat(result, asize, aoffset, US"\\", 1);
- result = string_cat(result, asize, aoffset, US value+j, 1);
+ result = string_cat
n
(result, asize, aoffset, US"\\", 1);
+ result = string_cat
n
(result, asize, aoffset, US value+j, 1);
}
}
- result = string_cat(result, asize, aoffset, US"\"", 1);
+ result = string_cat
n
(result, asize, aoffset, US"\"", 1);
}
else
}
else
- {
- result = string_cat(result, asize, aoffset, US value, vlength);
- }
+ result = string_catn(result, asize, aoffset, US value, vlength);
-return string_cat(result, asize, aoffset, US" ", 1);
+return string_cat
n
(result, asize, aoffset, US" ", 1);
}
/* End of lf_quote.c */
}
/* End of lf_quote.c */