From patchwork Tue May 29 06:59:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nick Desaulniers X-Patchwork-Id: 10434457 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED23E602BF for ; Tue, 29 May 2018 06:59:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DC7FB28618 for ; Tue, 29 May 2018 06:59:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CF8632861E; Tue, 29 May 2018 06:59:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 73A3428618 for ; Tue, 29 May 2018 06:59:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932187AbeE2G7O (ORCPT ); Tue, 29 May 2018 02:59:14 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:45780 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932182AbeE2G7O (ORCPT ); Tue, 29 May 2018 02:59:14 -0400 Received: by mail-pg0-f68.google.com with SMTP id w3-v6so6153703pgv.12; Mon, 28 May 2018 23:59:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=czm6tlvEU2BW6fxxL35IhLZA/my3WIUmRlcGskIVfxg=; b=vMTGyAu4jHkJdNJKzoZPLpoXeKT4lMoRm41olByN5szeGbbNjMAdoyy/QM802gl8yj 7OHA3avdyUQBbK6Zi8EiD/qfUsqa4AvQMLiV/Vqkf5du7ndrVN9GtxGZDLP1aK8CoVjq sn8K12pfT8RwnFUlIwGRbIUzdR0I5aTfNtBlRYYHSQu7QFGnuoUegs6gMowZC3sysP0A u1CVPHnbtXKJpacOZCKRBRSeU6Km387meuSqA6hJK4VWZF6FdqNS1HKWDTZdm2oqmm4h T6xaOSte2BH427LxsCoHkmvkfrq3pItUbi1JA/TB5jKpQh9jO4dCJcz1wElDUxCbWHq1 ZM/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=czm6tlvEU2BW6fxxL35IhLZA/my3WIUmRlcGskIVfxg=; b=mVg361rdwb8VKqa8q9fAybdHeg/+hmFBEpmKBdbwnhNC0QJOYM32FVqzQBNwlTQjpE krFEdXkxpfzRG8Djou++zyU1O4fz7q4t/2WmD+M0wtnSsNPHQC3rRdqGB4ZJTb1SRV8N qrzEtQ74HHMj3wFc3gCfJ3maczFY7MlFJWC9ey29FfY817O3owUZCK7ka2pp80y1XTro 0kwpq9KbRANGqA01YIXygzsP+NhyeyF0EN2n79yvAC96PtsvXredNwgR3uRh5ikFqM8z E6lVcGlEDFn9j8e7/NO2zOX/pQBK2o254EDHf8B21p2wBIsE3jFGbs20zEvD7Dt+mcRd FpTw== X-Gm-Message-State: ALKqPwca/8SDjl5gCPCbKksVM3y2e7rTnBjpXay5mgc2s2893tckgzvc GEH4uGBjYEckiwmyqp5ECA9bg38hJLQ= X-Google-Smtp-Source: AB8JxZomDkbOjkAKG77WCfUSIoKllWlEaSIWGriZlkb+fAQGJ6UQbw77t7XOdKJNtnZJUq2ZxpAj8A== X-Received: by 2002:a62:fb14:: with SMTP id x20-v6mr16275496pfm.48.1527577153681; Mon, 28 May 2018 23:59:13 -0700 (PDT) Received: from localhost.localdomain (c-24-6-183-110.hsd1.ca.comcast.net. [24.6.183.110]) by smtp.googlemail.com with ESMTPSA id u9-v6sm60399662pfi.60.2018.05.28.23.59.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 May 2018 23:59:12 -0700 (PDT) From: Nick Desaulniers To: b.zolnierkie@samsung.com Cc: Nick Desaulniers , dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video/hdmi: prefer strlcpy to strncpy Date: Mon, 28 May 2018 23:59:05 -0700 Message-Id: <1527577145-7750-1-git-send-email-nick.desaulniers@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes a stringop-truncation warning from gcc-8. Signed-off-by: Nick Desaulniers --- drivers/video/hdmi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c index 111a0ab..46c184c 100644 --- a/drivers/video/hdmi.c +++ b/drivers/video/hdmi.c @@ -168,8 +168,8 @@ int hdmi_spd_infoframe_init(struct hdmi_spd_infoframe *frame, frame->version = 1; frame->length = HDMI_SPD_INFOFRAME_SIZE; - strncpy(frame->vendor, vendor, sizeof(frame->vendor)); - strncpy(frame->product, product, sizeof(frame->product)); + strlcpy(frame->vendor, vendor, sizeof(frame->vendor)); + strlcpy(frame->product, product, sizeof(frame->product)); return 0; }