Re: [PATCH v2 4/6] intel_device: fix warning on possible buffer overlflow on sprintf() calls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 21, 2024 at 07:55:48PM +0100, Enrico Weigelt, metux IT consult wrote:
> Signed-off-by: Enrico Weigelt, metux IT consult <info@xxxxxxxxx>
> ---
>  src/intel_device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/intel_device.c b/src/intel_device.c
> index f28d3be1..06108ec3 100644
> --- a/src/intel_device.c
> +++ b/src/intel_device.c
> @@ -335,7 +335,7 @@ static int __intel_open_device__major_minor(int _major, int _minor)
>  static int __intel_open_device__pci(const struct pci_device *pci)
>  {
>  	struct stat st;
> -	char path[256];
> +	char path[PATH_MAX];

I had a slightly different take on this in
https://patchwork.freedesktop.org/series/115348/

I suppose I should actually push that stuff...

>  	DIR *dir;
>  	struct dirent *de;
>  	int base;
> --
> 2.39.2

-- 
Ville Syrjälä
Intel



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux