From 9b2b49a4785181c144ed2a963360ba60f99a7762 Mon Sep 17 00:00:00 2001 From: christos Date: Sat, 7 Jul 2007 18:04:17 +0000 Subject: [PATCH] off by one fix from Anon Ymous --- usr.bin/mail/format.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/mail/format.c b/usr.bin/mail/format.c index 468b9cb8483b..dd3494f2c9af 100644 --- a/usr.bin/mail/format.c +++ b/usr.bin/mail/format.c @@ -1,4 +1,4 @@ -/* $NetBSD: format.c,v 1.6 2007/07/07 17:53:13 christos Exp $ */ +/* $NetBSD: format.c,v 1.7 2007/07/07 18:04:17 christos Exp $ */ /*- * Copyright (c) 2006 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include #ifndef __lint__ -__RCSID("$NetBSD: format.c,v 1.6 2007/07/07 17:53:13 christos Exp $"); +__RCSID("$NetBSD: format.c,v 1.7 2007/07/07 18:04:17 christos Exp $"); #endif /* not __lint__ */ #include @@ -804,7 +804,7 @@ protect(const char *str) if (str == NULL || (size = strlen(str)) == 0) return str; - p = salloc(2 * size); + p = salloc(2 * size + 1); for (q = p; *str; str++) { *q = *str; if (*q++ == '%')