Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3073660imm; Tue, 29 May 2018 00:00:29 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLZwNT2EbbF/PDpvwaUF2e9gBzvgLMimz/NcQRi+CagHAJQNNE9ozWmniThfiff1NfQqeIH X-Received: by 2002:a17:902:7c83:: with SMTP id y3-v6mr11878682pll.51.1527577229458; Tue, 29 May 2018 00:00:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527577229; cv=none; d=google.com; s=arc-20160816; b=zFYkLkk3y4VdZ/kDrJhwyfbvy0Qa+LG+kqX1tN+VqWqT3RrdCCyBvG2YC/DCYOiAjf naj6PfrVoTjWsyy69Ovx//VCLyiJeJsUcyj9xsEwxQNfJJCKUR82f8iLRDOexYMJssug ulUfGmbZ9tVgasNs1c6nh52766tiSQnTJTHmM8wb25AwC6lda15Lr67uXzvgPHkkLsTo AmBibHOF+8QcyZTQipIE7QN1kVUGKwFgBl3C7Xy2XgPijzWRWX4XTm30/ZDlgcdy43cY f6UJONHoGlyXCOgycnIuy/8k7IWtSg6y6ujkSftnToUj7K+6avcCUw5/hbVUTd3EguM9 yVKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=czm6tlvEU2BW6fxxL35IhLZA/my3WIUmRlcGskIVfxg=; b=wTCE8epoz17zmxOPYon2CieiToHWreeOpgPgHmWDquCc92Z+gUo33N5SvwtRW927Wo CGRRooAwK6qUfg67Z8zcj4SNVmQdzLHZAqurC0HqFIlud3Nd6e/FrxYo3h4AxJ28Rc11 2/zLvXppu0ga79BVvmlKeJvF/MW32pGGenemj6vMsig7OZ0Dh0Rul8L9UBrlRN6nlX4b Ti9xi9niLmVEFN2uVlbsqol3iW9vLz6+5a4EC3qa3gX5EOwIesVfgFh8hLSXyMwk5vee ZnB7knI7NGVIEEW25O9mvzTNoPvugCcctT4zwvPmB9PpDUa4vBCD35DouB4FUC/tLCC9 AodA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vMTGyAu4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x70-v6si5947008pgx.576.2018.05.29.00.00.15; Tue, 29 May 2018 00:00:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=vMTGyAu4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932209AbeE2G7P (ORCPT + 99 others); Tue, 29 May 2018 02:59:15 -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-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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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; } -- 2.7.4