* Exim - an Internet mail transport agent *
*************************************************/
-/* Copyright (c) University of Cambridge 1995 - 2017 */
+/* Copyright (c) University of Cambridge 1995 - 2018 */
/* See the file NOTICE for conditions of use and distribution. */
#include "../exim.h"
if (ret != 0)
{
*errmsg = (void *)sqlite3_errmsg(db);
- debug_printf("Error opening database: %s\n", *errmsg);
+ debug_printf_indent("Error opening database: %s\n", *errmsg);
}
sqlite3_busy_timeout(db, 1000 * sqlite_lock_timeout);
sqlite_callback(void *arg, int argc, char **argv, char **azColName)
{
gstring * res = *(gstring **)arg;
-int i;
/* For second and subsequent results, insert \n */
if (argc > 1)
{
/* For multiple fields, include the field name too */
- for (i = 0; i < argc; i++)
+ for (int i = 0; i < argc; i++)
{
uschar *value = US((argv[i] != NULL)? argv[i]:"<NULL>");
res = lf_quote(US azColName[i], value, Ustrlen(value), res);
ret = sqlite3_exec(handle, CS query, sqlite_callback, &res, (char **)errmsg);
if (ret != SQLITE_OK)
{
- debug_printf("sqlite3_exec failed: %s\n", *errmsg);
+ debug_printf_indent("sqlite3_exec failed: %s\n", *errmsg);
return FAIL;
}
while ((c = *t++) != 0) if (c == '\'') count++;
if (count == 0) return s;
-t = quoted = store_get(Ustrlen(s) + count + 1);
+t = quoted = store_get(Ustrlen(s) + count + 1, is_tainted(s));
while ((c = *s++) != 0)
{