From 5037151c08a846544f7cc7c5f0834a4a54118279 Mon Sep 17 00:00:00 2001 From: jca Date: Thu, 14 Dec 2017 13:23:30 +0000 Subject: [PATCH] fuse_opt_add_opt_escaped needs to allocate space for the terminating NUL Spotted by malloc.conf -> S, ok helg@ --- lib/libfuse/fuse_opt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libfuse/fuse_opt.c b/lib/libfuse/fuse_opt.c index f4bb20428c7..26f86a5cf44 100644 --- a/lib/libfuse/fuse_opt.c +++ b/lib/libfuse/fuse_opt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fuse_opt.c,v 1.23 2017/12/13 12:23:48 helg Exp $ */ +/* $OpenBSD: fuse_opt.c,v 1.24 2017/12/14 13:23:30 jca Exp $ */ /* * Copyright (c) 2013 Sylvestre Gallon * Copyright (c) 2013 Stefan Sperling @@ -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); -- 2.20.1