artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a3f8826
)
fuse_opt_add_opt_escaped needs to allocate space for the terminating NUL
author
jca
<jca@openbsd.org>
Thu, 14 Dec 2017 13:23:30 +0000
(13:23 +0000)
committer
jca
<jca@openbsd.org>
Thu, 14 Dec 2017 13:23:30 +0000
(13:23 +0000)
Spotted by malloc.conf -> S, ok helg@
lib/libfuse/fuse_opt.c
patch
|
blob
|
history
diff --git
a/lib/libfuse/fuse_opt.c
b/lib/libfuse/fuse_opt.c
index
f4bb204
..
26f86a5
100644
(file)
--- a/
lib/libfuse/fuse_opt.c
+++ b/
lib/libfuse/fuse_opt.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: fuse_opt.c,v 1.2
3 2017/12/13 12:23:48 helg
Exp $ */
+/* $OpenBSD: fuse_opt.c,v 1.2
4 2017/12/14 13:23:30 jca
Exp $ */
/*
* Copyright (c) 2013 Sylvestre Gallon <ccna.syl@gmail.com>
* Copyright (c) 2013 Stefan Sperling <stsp@openbsd.org>
@@
-148,6
+148,7
@@
fuse_opt_add_opt_escaped(char **opts, const char *opt)
s++;
size++;
}
+ size++; /* trailing NUL */
if (escaped > 0) {
escaped_opt = malloc(size + escaped);