X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Flookups%2Fjson.c;h=15b8617512f07d666d8ac918345089b3f66af0a5;hb=53ef3d8498e76615b531f2f61604334e9884ba03;hp=0b28b731ed54c10ef101a735650b7e97a78c5808;hpb=ffc92d69bf2618aca35f2c523abde0a76657e3a2;p=exim.git diff --git a/src/src/lookups/json.c b/src/src/lookups/json.c index 0b28b731e..15b861751 100644 --- a/src/src/lookups/json.c +++ b/src/src/lookups/json.c @@ -16,12 +16,14 @@ which is freed once by search_tidyup(). Make the free call a dummy. This burns some 300kB in handling a 37kB JSON file, for the benefit of a fast free. The alternative of staying with malloc is nearly as bad, eyeballing the activity there are 20% the number of free vs. alloc -calls (before the big bunch at the end). */ +calls (before the big bunch at the end). + +Assume that the file is trusted, so no tainting */ static void * json_malloc(size_t nbytes) { -void * p = store_get((int)nbytes); +void * p = store_get((int)nbytes, FALSE); /* debug_printf("%s %d: %p\n", __FUNCTION__, (int)nbytes, p); */ return p; } @@ -108,7 +110,7 @@ for (int k = 1; (key = string_nextinlist(&keystring, &sep, NULL, 0)); k++) : json_object_get(j, CCS key) ) ) { - DEBUG(D_lookup) debug_printf("%s, for key %d: '%s'\n", + DEBUG(D_lookup) debug_printf_indent("%s, for key %d: '%s'\n", numeric ? US"bad index, or not json array" : US"no such key, or not json object",