From patchwork Thu Aug 28 13:14:09 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 36194 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f199.google.com (mail-qc0-f199.google.com [209.85.216.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 49BD32054F for ; Thu, 28 Aug 2014 13:14:36 +0000 (UTC) Received: by mail-qc0-f199.google.com with SMTP id x3sf4697543qcv.2 for ; Thu, 28 Aug 2014 06:14:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=0Qb4ZCJstqoT9tfYzPQDFWO6iWfbeoIG30iMGPmZX1g=; b=m4tvOm691gaJwLQDrSaHAtMBx+ybhuzuj2Y9Qo5oCQ7K4DRdPyjSwUsPAsTPfrtEcm 9RSZWSVjJ8XeYaEQ9z6P89dU8RTJlUvzqMYwmyNW6lsVfd15m+sG9icXqLs/lmxkn/p+ r6iRufVHJV1MCGi1+6tsfWe53ABtKTsHjVFm81p2O/5wkaqEAjDFqBDfNt8+EMj3Wufn OuV2mUoulwaOsqqahilPY8pF6WzYdG3cGVnpoolQvEDcZuUsSwRQ2wZWNKyjrQ1x0H0r RbmxoeL/FWcEbdIO9PVKDMx7FDVheyEb9uXZpBublLgX2mMaX2kz2RN3+AzpKpX7VXnJ U25A== X-Gm-Message-State: ALoCoQnBsoOM1osIOTX8nNdZtxECTtcIuBSC7j37gaMss2FqyIBdbza+HfuX/rjdOxVdemFFgKg1 X-Received: by 10.236.31.129 with SMTP id m1mr124806yha.47.1409231676192; Thu, 28 Aug 2014 06:14:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.47 with SMTP id 44ls563617qgc.11.gmail; Thu, 28 Aug 2014 06:14:36 -0700 (PDT) X-Received: by 10.220.202.9 with SMTP id fc9mr675726vcb.40.1409231676087; Thu, 28 Aug 2014 06:14:36 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id uv6si3374323vcb.3.2014.08.28.06.14.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:36 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id hy4so746448vcb.5 for ; Thu, 28 Aug 2014 06:14:35 -0700 (PDT) X-Received: by 10.52.3.40 with SMTP id 8mr2530576vdz.24.1409231675856; Thu, 28 Aug 2014 06:14:35 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.45.67 with SMTP id uj3csp234630vcb; Thu, 28 Aug 2014 06:14:35 -0700 (PDT) X-Received: by 10.42.4.136 with SMTP id 8mr4173561ics.57.1409231675299; Thu, 28 Aug 2014 06:14:35 -0700 (PDT) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) by mx.google.com with ESMTPS id a9si9218314ign.39.2014.08.28.06.14.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Aug 2014 06:14:35 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.223.172 as permitted sender) client-ip=209.85.223.172; Received: by mail-ie0-f172.google.com with SMTP id rd18so911495iec.3 for ; Thu, 28 Aug 2014 06:14:35 -0700 (PDT) X-Received: by 10.50.118.4 with SMTP id ki4mr37997475igb.16.1409231675066; Thu, 28 Aug 2014 06:14:35 -0700 (PDT) Received: from localhost.localdomain (host86-152-0-170.range86-152.btcentralplus.com. [86.152.0.170]) by mx.google.com with ESMTPSA id w8sm16633672igl.13.2014.08.28.06.14.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Aug 2014 06:14:34 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Lee Jones , gregkh@linuxfoundation.org Subject: [PATCH 03/11] misc: st_kim: Increase size of dev_name buffer to incorporate termination Date: Thu, 28 Aug 2014 14:14:09 +0100 Message-Id: <1409231657-18294-3-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> References: <1409231657-18294-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Calling strncpy with a maximum size argument of 32 bytes on destination array kim_gdata->dev_name of size 32 bytes might leave the destination string unterminated. Cc: gregkh@linuxfoundation.org Signed-off-by: Lee Jones --- include/linux/ti_wilink_st.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/ti_wilink_st.h b/include/linux/ti_wilink_st.h index 932b7639..884d626 100644 --- a/include/linux/ti_wilink_st.h +++ b/include/linux/ti_wilink_st.h @@ -268,7 +268,7 @@ struct kim_data_s { struct st_data_s *core_data; struct chip_version version; unsigned char ldisc_install; - unsigned char dev_name[UART_DEV_NAME_LEN]; + unsigned char dev_name[UART_DEV_NAME_LEN + 1]; unsigned char flow_cntrl; unsigned long baud_rate; };