Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Thomas Zimmermann
Am 11.03.20 um 09:24 schrieb Takashi Iwai: > On Wed, 11 Mar 2020 09:10:56 +0100, > Thomas Zimmermann wrote: >> >> Hi Takashi >> >> Am 11.03.20 um 08:35 schrieb Takashi Iwai: >>> Since snprintf() returns the would-be-output size instead of the >>> actual output size, the succeeding calls may go be

Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Thomas Zimmermann
Hi Am 11.03.20 um 09:24 schrieb Takashi Iwai: > On Wed, 11 Mar 2020 09:10:56 +0100, > Thomas Zimmermann wrote: >> >> Hi Takashi >> >> Am 11.03.20 um 08:35 schrieb Takashi Iwai: >>> Since snprintf() returns the would-be-output size instead of the >>> actual output size, the succeeding calls may go

Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Takashi Iwai
On Wed, 11 Mar 2020 09:10:56 +0100, Thomas Zimmermann wrote: > > Hi Takashi > > Am 11.03.20 um 08:35 schrieb Takashi Iwai: > > Since snprintf() returns the would-be-output size instead of the > > actual output size, the succeeding calls may go beyond the given > > buffer limit. Fix it by replaci

Re: [PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Thomas Zimmermann
Hi Takashi Am 11.03.20 um 08:35 schrieb Takashi Iwai: > Since snprintf() returns the would-be-output size instead of the > actual output size, the succeeding calls may go beyond the given > buffer limit. Fix it by replacing with scnprintf(). > > Signed-off-by: Takashi Iwai > --- > drivers/gpu/

[PATCH] drm: sysfs: Use scnprintf() for avoiding potential buffer overflow

2020-03-11 Thread Takashi Iwai
Since snprintf() returns the would-be-output size instead of the actual output size, the succeeding calls may go beyond the given buffer limit. Fix it by replacing with scnprintf(). Signed-off-by: Takashi Iwai --- drivers/gpu/drm/drm_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)