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
SPDX: license tags (mostly by guesswork)
[exim.git]
/
src
/
src
/
lookups
/
nisplus.c
diff --git
a/src/src/lookups/nisplus.c
b/src/src/lookups/nisplus.c
index dc3735b6bac7fe40846458011ed33d05bef015f0..78c79563fabd4982a9b8ab1830fbe7d7b2596730 100644
(file)
--- a/
src/src/lookups/nisplus.c
+++ b/
src/src/lookups/nisplus.c
@@
-2,9
+2,10
@@
* Exim - an Internet mail transport agent *
*************************************************/
* Exim - an Internet mail transport agent *
*************************************************/
+/* Copyright (c) The Exim Maintainers 2020 - 2022 */
/* Copyright (c) University of Cambridge 1995 - 2018 */
/* Copyright (c) University of Cambridge 1995 - 2018 */
-/* Copyright (c) The Exim Maintainers 2020 */
/* 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-only */
#include "../exim.h"
#include "lf_functions.h"
#include "../exim.h"
#include "lf_functions.h"
@@
-226,25
+227,24
@@
characters. No options are recognized.
Arguments:
s the string to be quoted
opt additional option text or NULL if none
Arguments:
s the string to be quoted
opt additional option text or NULL if none
+ idx lookup type index
Returns: the processed string or NULL for a bad option
*/
static uschar *
Returns: the processed string or NULL for a bad option
*/
static uschar *
-nisplus_quote(uschar *
s, uschar *opt
)
+nisplus_quote(uschar *
s, uschar * opt, unsigned idx
)
{
int count = 0;
{
int count = 0;
-uschar *quoted;
-uschar *t = s;
+uschar * quoted, * t = s;
-if (opt
!= NULL
) return NULL; /* No options recognized */
+if (opt) return NULL; /* No options recognized */
-while (*t != 0) if (*t++ == '\"') count++;
-if (count == 0) return s;
+while (*t) if (*t++ == '\"') count++;
-t = quoted = store_get
(Ustrlen(s) + count + 1, is_tainted(s)
);
+t = quoted = store_get
_quoted(Ustrlen(s) + count + 1, s, idx
);
-while (*s
!= 0
)
+while (*s)
{
*t++ = *s;
if (*s++ == '\"') *t++ = '\"';
{
*t++ = *s;
if (*s++ == '\"') *t++ = '\"';