Got questions, comments, patches, etc.?
Contact Jason Woofenden
gitweb
/
spectrwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96db1bf
)
Warn the user if format is too long.
author
Tiago Cunha
<tcunha@gmx.com>
Sun, 13 May 2012 21:52:23 +0000
(22:52 +0100)
committer
Tiago Cunha
<tcunha@gmx.com>
Tue, 5 Jun 2012 21:32:01 +0000
(22:32 +0100)
spectrwm.c
patch
|
blob
|
history
diff --git
a/spectrwm.c
b/spectrwm.c
index
082d04e
..
abf3d20
100644
(file)
--- a/
spectrwm.c
+++ b/
spectrwm.c
@@
-1575,7
+1575,8
@@
bar_fmt_expand(char *fmtexp, size_t sz)
strlcpy(fmtexp, fmt, sz);
/* finally pass the string through strftime(3) */
#ifndef SWM_DENY_CLOCK_FORMAT
- len = strftime(fmtexp, sz, fmt, &tm);
+ if ((len = strftime(fmtexp, sz, fmt, &tm)) == 0)
+ warnx("format too long");
fmtexp[len] = '\0';
#endif
}