From 15c2e150ed84627f1fb6ee3ccf65d7a806d42164 Mon Sep 17 00:00:00 2001 From: mikeb Date: Thu, 18 Jan 2018 11:43:20 +0000 Subject: [PATCH] Fix an off-by-one uncovered by the recent free(9) change From canacar@, thanks! --- sys/dev/pv/pvbus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/pv/pvbus.c b/sys/dev/pv/pvbus.c index 902221ec6f5..885cf702c20 100644 --- a/sys/dev/pv/pvbus.c +++ b/sys/dev/pv/pvbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pvbus.c,v 1.17 2017/06/22 06:21:12 jmatthew Exp $ */ +/* $OpenBSD: pvbus.c,v 1.18 2018/01/18 11:43:20 mikeb Exp $ */ /* * Copyright (c) 2015 Reyk Floeter @@ -480,8 +480,8 @@ pvbusioctl(dev_t dev, u_long cmd, caddr_t data, int flags, struct proc *p) break; } - free(key, M_TEMP, keylen); - free(value, M_TEMP, valuelen); + free(key, M_TEMP, keylen + 1); + free(value, M_TEMP, valuelen + 1); return (error); } -- 2.20.1