From patchwork Tue Jul 24 01:00:24 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 1229921 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id AC5B5DFFBF for ; Tue, 24 Jul 2012 01:38:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755226Ab2GXBiO (ORCPT ); Mon, 23 Jul 2012 21:38:14 -0400 Received: from marvin.crapouillou.net ([109.190.31.181]:56571 "EHLO marvin.crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755135Ab2GXBiM (ORCPT ); Mon, 23 Jul 2012 21:38:12 -0400 Received: from acaen-252-1-204-197.w83-115.abo.wanadoo.fr ([83.115.244.197] helo=cerebro.rooms.iriga) by marvin.crapouillou.net with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1StTUO-0000ru-LO; Tue, 24 Jul 2012 03:00:40 +0200 From: Paul Cercueil To: FlorianSchandinat@gmx.de Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, Paul Cercueil Subject: [PATCH 2/4] fbcon: prevent possible buffer overflow. Date: Tue, 24 Jul 2012 03:00:24 +0200 Message-Id: <1343091626-11435-2-git-send-email-paul@crapouillou.net> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1343091626-11435-1-git-send-email-paul@crapouillou.net> References: <1343091626-11435-1-git-send-email-paul@crapouillou.net> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Signed-off-by: Paul Cercueil --- drivers/video/console/fbcon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index a0b1818..3ffab97 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -442,7 +442,7 @@ static int __init fb_console_setup(char *this_opt) while ((options = strsep(&this_opt, ",")) != NULL) { if (!strncmp(options, "font:", 5)) - strcpy(fontname, options + 5); + strlcpy(fontname, options + 5, sizeof(fontname)); if (!strncmp(options, "scrollback:", 11)) { char *k;