git.samba.org
/
jelmer
/
ctrlproxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ceba2eb
)
Fix crash bug in log_custom (Patch by Korbinian Rosenegger)
author
jelmer@VERNSTOK.NL
<jelmer@VERNSTOK.NL>
Fri, 4 Feb 2005 00:30:02 +0000
(
02:30
+0200)
committer
jelmer@VERNSTOK.NL
<jelmer@VERNSTOK.NL>
Fri, 4 Feb 2005 00:30:02 +0000
(
02:30
+0200)
mods/log_custom.c
patch
|
blob
|
history
diff --git
a/mods/log_custom.c
b/mods/log_custom.c
index 35fb667d44e3287a6751a9f74951ffe57dfaf255..4f749a982640dd29f5b978d72ba39df6f8b6be89 100644
(file)
--- a/
mods/log_custom.c
+++ b/
mods/log_custom.c
@@
-209,6
+209,7
@@
static void custom_subst(char **_new, const char *fmt, struct line *l, const cha
for(i = 0; i < strlen(fmt); i++) {
if(fmt[i] == '%') {
subst[(int)fmt[i+1]] = find_mapping(l, fmt[i+1], case_sensitive);
+ if (subst[(int)fmt[i+1]] == NULL) subst[(int)fmt[i+1]] = g_strdup("");
len += strlen(subst[(int)fmt[i+1]]);
}
}