projects
/
suckless
/
dwm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2210ea7
)
applied Jukka's patch preventing some cornercases and making the EOF error message...
author
arg@mig29
<unknown>
Mon, 27 Nov 2006 09:29:47 +0000
(10:29 +0100)
committer
arg@mig29
<unknown>
Mon, 27 Nov 2006 09:29:47 +0000
(10:29 +0100)
main.c
patch
|
blob
|
history
diff --git
a/main.c
b/main.c
index 934bea4a1176706d4c1a8fdc0ab80fe3829a2fba..062f9d7557b8d3c8828bfd5dc16de9864faa019e 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-277,10
+277,11
@@
main(int argc, char *argv[]) {
switch(r = read(STDIN_FILENO, stext, sizeof stext - 1)) {
case -1:
strncpy(stext, strerror(errno), sizeof stext - 1);
+ stext[sizeof stext - 1] = '\0';
readin = False;
break;
case 0:
- strncpy(stext, "EOF",
sizeof stext
);
+ strncpy(stext, "EOF",
4
);
readin = False;
break;
default: