projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
898052f
)
tools: replace st00pid uses of strcpy
author
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 21 Oct 2012 20:57:22 +0000
(22:57 +0200)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 21 Oct 2012 20:57:22 +0000
(22:57 +0200)
libcitadel/lib/tools.c
patch
|
blob
|
history
diff --git
a/libcitadel/lib/tools.c
b/libcitadel/lib/tools.c
index f520ee2d96b5365d2876a8385fbd50b6788672cb..c0d3f9f1e00f0ef063ae6482f0785b84980cabfb 100644
(file)
--- a/
libcitadel/lib/tools.c
+++ b/
libcitadel/lib/tools.c
@@
-573,7
+573,7
@@
void fmt_date(char *buf, size_t n, time_t thetime, int seconds) {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
-
strcpy(buf, "")
;
+
*buf = '\0'
;
localtime_r(&thetime, &tm);
hour = tm.tm_hour;
@@
-835,7
+835,7
@@
void urlesc(char *outbuf, size_t oblen, char *strbuf)
int a, b, c, len, eclen, olen;
char *ec = " +#&;`'|*?-~<>^()[]{}/$\"\\";
-
strcpy(outbuf, "")
;
+
*outbuf = '\0'
;
len = strlen(strbuf);
eclen = strlen(ec);
olen = 0;