From patchwork Mon Nov 1 21:01:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 296002 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oA1L1pQE028346 for ; Mon, 1 Nov 2010 21:01:51 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754470Ab0KAVBu (ORCPT ); Mon, 1 Nov 2010 17:01:50 -0400 Received: from adelie.canonical.com ([91.189.90.139]:34838 "EHLO adelie.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754377Ab0KAVBu (ORCPT ); Mon, 1 Nov 2010 17:01:50 -0400 Received: from hutte.canonical.com ([91.189.90.181]) by adelie.canonical.com with esmtp (Exim 4.69 #1 (Debian)) id 1PD1Vj-0006pg-Mg; Mon, 01 Nov 2010 21:01:47 +0000 Received: from [12.157.84.185] (helo=localhost.localdomain) by hutte.canonical.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PD1Vj-0007hT-G3; Mon, 01 Nov 2010 21:01:47 +0000 From: Andy Whitcroft To: Linus Torvalds Cc: Andy Whitcroft , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/1] kconfig: sym_expand_string_value: allow for string termination when reallocing Date: Mon, 1 Nov 2010 21:01:44 +0000 Message-Id: <1288645304-2794-2-git-send-email-apw@canonical.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1288645304-2794-1-git-send-email-apw@canonical.com> References: <1288645304-2794-1-git-send-email-apw@canonical.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Mon, 01 Nov 2010 21:01:51 +0000 (UTC) diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index c0efe10..af6e9f3 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -875,7 +875,7 @@ const char *sym_expand_string_value(const char *in) symval = sym_get_string_value(sym); } - newlen = strlen(res) + strlen(symval) + strlen(src); + newlen = strlen(res) + strlen(symval) + strlen(src) + 1; if (newlen > reslen) { reslen = newlen; res = realloc(res, reslen);