Module Name: src Committed By: abhinav Date: Wed Jul 6 18:03:27 UTC 2016
Modified Files: src/usr.sbin/makemandb: apropos-utils.c Log Message: Fix an off by one issue when concatenating strings. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/usr.sbin/makemandb/apropos-utils.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/makemandb/apropos-utils.c diff -u src/usr.sbin/makemandb/apropos-utils.c:1.27 src/usr.sbin/makemandb/apropos-utils.c:1.28 --- src/usr.sbin/makemandb/apropos-utils.c:1.27 Wed Jul 6 06:57:40 2016 +++ src/usr.sbin/makemandb/apropos-utils.c Wed Jul 6 18:03:27 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: apropos-utils.c,v 1.27 2016/07/06 06:57:40 abhinav Exp $ */ +/* $NetBSD: apropos-utils.c,v 1.28 2016/07/06 18:03:27 abhinav Exp $ */ /*- * Copyright (c) 2011 Abhinav Upadhyay <er.abhinav.upadh...@gmail.com> * All rights reserved. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__RCSID("$NetBSD: apropos-utils.c,v 1.27 2016/07/06 06:57:40 abhinav Exp $"); +__RCSID("$NetBSD: apropos-utils.c,v 1.28 2016/07/06 18:03:27 abhinav Exp $"); #include <sys/queue.h> #include <sys/stat.h> @@ -134,7 +134,7 @@ concat2(char **dst, const char *src, siz /* Now, copy src at the end of dst */ memcpy(*dst + dstlen, src, srclen); - (*dst)[dstlen + srclen + 1] = '\0'; + (*dst)[dstlen + srclen] = '\0'; } void