projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50a27a3
)
Expand buffer to max string size
author
Alan T. DeKok
<aland@freeradius.org>
Mon, 13 Apr 2015 16:43:49 +0000
(12:43 -0400)
committer
Alan T. DeKok
<aland@freeradius.org>
Mon, 13 Apr 2015 16:44:15 +0000
(12:44 -0400)
src/modules/rlm_logintime/timestr.c
patch
|
blob
|
history
diff --git
a/src/modules/rlm_logintime/timestr.c
b/src/modules/rlm_logintime/timestr.c
index
c90e471
..
5c85f29
100644
(file)
--- a/
src/modules/rlm_logintime/timestr.c
+++ b/
src/modules/rlm_logintime/timestr.c
@@
-176,10
+176,9
@@
static int day_fill(char *bitmap, const char *tm)
static int week_fill(char *bitmap, char *tm)
{
char *s;
- char tmp[
128
];
+ char tmp[
256
];
- strlcpy(tmp, tm, 128);
- tmp[127] = 0;
+ strlcpy(tmp, tm, sizeof(tmp));
for (s = tmp; *s; s++)
if (isupper(*s)) *s = tolower(*s);