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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 6 Oct 2011 23:29:50 -0400
From:	Arnaud Lacombe <lacombar@...il.com>
To:	Reinhard Tartler <Reinhard.Tartler@...ormatik.uni-erlangen.de>
Cc:	linux-kbuild@...r.kernel.org, Jean Sacren <sakiwit@...il.com>,
	Michal Marek <mmarek@...e.cz>, linux-kernel@...r.kernel.org,
	vamos-dev@...ts.informatik.uni-erlangen.de
Subject: Re: [PATCH] kconfig: Fix checking return value of 'fwrite'

Hi,

2011/10/6 Reinhard Tartler <Reinhard.Tartler@...ormatik.uni-erlangen.de>:
> fwrite indicates '1' written member if a zero-length string is written.
you forgot the "Signed-off-by: " part :)

 - Arnaud

> ---
>  scripts/kconfig/lkc.h |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/kconfig/lkc.h b/scripts/kconfig/lkc.h
> index b633bdb..727d265 100644
> --- a/scripts/kconfig/lkc.h
> +++ b/scripts/kconfig/lkc.h
> @@ -90,7 +90,7 @@ struct conf_printer {
>  /* confdata.c and expr.c */
>  static inline void xfwrite(const void *str, size_t len, size_t count, FILE *out)
>  {
> -       if (fwrite(str, len, count, out) < count)
> +       if (len > 0 && fwrite(str, len, count, out) < count)
>                fprintf(stderr, "\nError in writing or end of file.\n");
>  }
>
> --
> 1.7.0.4
>
> --
> Reinhard Tartler                     Department of Computer Science IV
> Martensstr 1, 91058 Erlangen Germany, University of Erlangen-Nuremberg
>            http://www4.informatik.uni-erlangen.de/~tartler
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ