lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b1265696-20f1-40dc-bf3a-5f81a429238b@mev.co.uk>
Date: Fri, 6 Sep 2024 11:43:30 +0100
From: Ian Abbott <abbotti@....co.uk>
To: Ruffalo Lavoisier <ruffalolavoisier@...il.com>,
 H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ni_routing: Check when the file could not be opened

On 05/09/2024 15:42, Ruffalo Lavoisier wrote:
> Signed-off-by: Ruffalo Lavoisier <RuffaloLavoisier@...il.com>
> ---
>   drivers/comedi/drivers/ni_routing/tools/convert_c_to_py.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/comedi/drivers/ni_routing/tools/convert_c_to_py.c b/drivers/comedi/drivers/ni_routing/tools/convert_c_to_py.c
> index d55521b5bdcb..d0321a7565c5 100644
> --- a/drivers/comedi/drivers/ni_routing/tools/convert_c_to_py.c
> +++ b/drivers/comedi/drivers/ni_routing/tools/convert_c_to_py.c
> @@ -139,6 +139,10 @@ void device_write(const struct ni_device_routes *dR, FILE *fp)
>   int main(void)
>   {
>   	FILE *fp = fopen("ni_values.py", "w");
> +	if (fp == NULL) {
> +		fprintf(stderr, "Could not open file!");
> +		return -1;
> +	}
>   
>   	/* write route register values */
>   	fprintf(fp, "ni_route_values = {\n");

Looks good, but it could with some minimal description in addition to 
the patch header line.

The change is not urgent as the utility is only built manually and not 
part of the usual kernel build process. (It is only used to maintain a 
few source files, and not very often.)  Still, it's good to fix it.

Please could you add Greg Kroah-Hartman to the Cc list, as he is the 
person who normally commits comedi-related patches.

Thanks,

Ian

-- 
-=( Ian Abbott <abbotti@....co.uk> || MEV Ltd. is a company  )=-
-=( registered in England & Wales.  Regd. number: 02862268.  )=-
-=( Regd. addr.: S11 & 12 Building 67, Europa Business Park, )=-
-=( Bird Hall Lane, STOCKPORT, SK3 0XA, UK. || www.mev.co.uk )=-


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ