artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
86788aa
)
Fail if a \ appears at EOL rather than continuing off the end of the
author
nicm
<nicm@openbsd.org>
Sat, 25 Apr 2015 18:44:28 +0000
(18:44 +0000)
committer
nicm
<nicm@openbsd.org>
Sat, 25 Apr 2015 18:44:28 +0000
(18:44 +0000)
buffer, from Sebastien Marie.
usr.bin/file/magic-load.c
patch
|
blob
|
history
diff --git
a/usr.bin/file/magic-load.c
b/usr.bin/file/magic-load.c
index
5f3d1f1
..
6e9b683
100644
(file)
--- a/
usr.bin/file/magic-load.c
+++ b/
usr.bin/file/magic-load.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: magic-load.c,v 1.
2 2015/04/24 16:45:32
nicm Exp $ */
+/* $OpenBSD: magic-load.c,v 1.
3 2015/04/25 18:44:28
nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@
-401,6
+401,8
@@
magic_get_string(char **line, char *out, size_t *outlen)
}
switch (c = *++cp) {
+ case '\0': /* end of line */
+ return (-1);
case ' ':
*out++ = ' ';
break;