git://git.exim.org
/
users
/
heiko
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Track tainted data and refuse to expand it
[users/heiko/exim.git]
/
src
/
src
/
lookups
/
lsearch.c
diff --git
a/src/src/lookups/lsearch.c
b/src/src/lookups/lsearch.c
index 8b4459ad131a4f87b0f3c7b8a0b0515ce5a2d81d..76b76b8f9ad6115735486e6c06c8b7e37808913b 100644
(file)
--- a/
src/src/lookups/lsearch.c
+++ b/
src/src/lookups/lsearch.c
@@
-78,7
+78,7
@@
FILE *f = (FILE *)handle;
BOOL last_was_eol = TRUE;
BOOL this_is_eol = TRUE;
int old_pool = store_pool;
BOOL last_was_eol = TRUE;
BOOL this_is_eol = TRUE;
int old_pool = store_pool;
-
void *
reset_point = NULL;
+
rmark
reset_point = NULL;
uschar buffer[4096];
/* Wildcard searches may use up some store, because of expansions. We don't
uschar buffer[4096];
/* Wildcard searches may use up some store, because of expansions. We don't
@@
-90,7
+90,7
@@
safely stored in the search pool again. */
if(type == LSEARCH_WILD || type == LSEARCH_NWILD)
{
store_pool = POOL_MAIN;
if(type == LSEARCH_WILD || type == LSEARCH_NWILD)
{
store_pool = POOL_MAIN;
- reset_point = store_
get(0
);
+ reset_point = store_
mark(
);
}
filename = filename; /* Keep picky compilers happy */
}
filename = filename; /* Keep picky compilers happy */
@@
-241,7
+241,7
@@
for (last_was_eol = TRUE;
if (reset_point)
{
if (reset_point)
{
- store_reset(reset_point);
+
reset_point =
store_reset(reset_point);
store_pool = old_pool;
}
store_pool = old_pool;
}
@@
-294,7
+294,7
@@
for (last_was_eol = TRUE;
yield = string_cat(yield, s);
}
yield = string_cat(yield, s);
}
-
store_reset(yield->s + yield->ptr + 1
);
+
gstring_release_unused(yield
);
*result = string_from_gstring(yield);
return OK;
}
*result = string_from_gstring(yield);
return OK;
}