All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
	Thomas Winischhofer <thomas@winischhofer.net>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] video: fbdev: sis: sis_main.c:  Cleaning up missing null-terminate in conjunction with s
Date: Tue, 30 Sep 2014 10:01:00 +0000	[thread overview]
Message-ID: <542A7F5C.8030200@ti.com> (raw)
In-Reply-To: <1410716148-16243-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

On 14/09/14 20:35, Rickard Strandqvist wrote:
> Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  drivers/video/fbdev/sis/sis_main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
> index 3f12a2d..1f4c216 100644
> --- a/drivers/video/fbdev/sis/sis_main.c
> +++ b/drivers/video/fbdev/sis/sis_main.c
> @@ -5830,7 +5830,7 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  			ivideo->cardnumber++;
>  	}
>  
> -	strncpy(ivideo->myid, chipinfo->chip_name, 30);
> +	strlcpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid));
>  
>  	ivideo->warncount = 0;
>  	ivideo->chip_id = pdev->device;
> 

Thanks, queued for 3.18.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>,
	Thomas Winischhofer <thomas@winischhofer.net>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: <linux-fbdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] video: fbdev: sis: sis_main.c:  Cleaning up missing null-terminate in conjunction with strncpy
Date: Tue, 30 Sep 2014 13:01:00 +0300	[thread overview]
Message-ID: <542A7F5C.8030200@ti.com> (raw)
In-Reply-To: <1410716148-16243-1-git-send-email-rickard_strandqvist@spectrumdigital.se>

[-- Attachment #1: Type: text/plain, Size: 910 bytes --]

On 14/09/14 20:35, Rickard Strandqvist wrote:
> Replacing strncpy with strlcpy to avoid strings that lacks null terminate.
> 
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
> ---
>  drivers/video/fbdev/sis/sis_main.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/sis/sis_main.c b/drivers/video/fbdev/sis/sis_main.c
> index 3f12a2d..1f4c216 100644
> --- a/drivers/video/fbdev/sis/sis_main.c
> +++ b/drivers/video/fbdev/sis/sis_main.c
> @@ -5830,7 +5830,7 @@ static int sisfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  			ivideo->cardnumber++;
>  	}
>  
> -	strncpy(ivideo->myid, chipinfo->chip_name, 30);
> +	strlcpy(ivideo->myid, chipinfo->chip_name, sizeof(ivideo->myid));
>  
>  	ivideo->warncount = 0;
>  	ivideo->chip_id = pdev->device;
> 

Thanks, queued for 3.18.

 Tomi



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-09-30 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-14 17:35 [PATCH] video: fbdev: sis: sis_main.c: Cleaning up missing null-terminate in conjunction with strnc Rickard Strandqvist
2014-09-14 17:35 ` [PATCH] video: fbdev: sis: sis_main.c: Cleaning up missing null-terminate in conjunction with strncpy Rickard Strandqvist
2014-09-30 10:01 ` Tomi Valkeinen [this message]
2014-09-30 10:01   ` Tomi Valkeinen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=542A7F5C.8030200@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=rickard_strandqvist@spectrumdigital.se \
    --cc=thomas@winischhofer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.