git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
48cf5ff
)
avoid modifying source text, in appendfile
author
Jeremy Harris
<jgh146exb@wizmail.org>
Fri, 14 May 2021 23:19:26 +0000
(
00:19
+0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Sun, 27 Jun 2021 23:30:02 +0000
(
00:30
+0100)
src/src/transports/appendfile.c
patch
|
blob
|
history
diff --git
a/src/src/transports/appendfile.c
b/src/src/transports/appendfile.c
index 5d957b62e0b833358abc6ec608a496d2df3a5b1c..2d008d97d7915db65dd5fe6b7211e8e9478a892c 100644
(file)
--- a/
src/src/transports/appendfile.c
+++ b/
src/src/transports/appendfile.c
@@
-1368,8
+1368,8
@@
if (!isdirectory)
if (ob->create_directory && allow_creation_here)
{
uschar *p = Ustrrchr(path, '/');
-
*p = '\0'
;
- if (!directory_make(NULL, p
ath
, ob->dirmode, FALSE))
+
p = string_copyn(path, p - path)
;
+ if (!directory_make(NULL, p, ob->dirmode, FALSE))
{
addr->basic_errno = errno;
addr->message =
@@
-1378,7
+1378,6
@@
if (!isdirectory)
DEBUG(D_transport) debug_printf("%s transport: %s\n", tblock->name, path);
return FALSE;
}
- *p = '/';
}
/* If file_format is set we must check that any existing file matches one of