From: Johannes Schindelin Date: Wed, 03 May 2017 15:02:36 GMT Subject: Re: [PATCH v2 02/21] clone: use xfopen() instead of fopen() Message-ID: In-Reply-To: <20170503101706.9223-3-pclouds@gmail.com> Hi Duy, On Wed, 3 May 2017, Nguyễn Thái Ngọc Duy wrote: > This code uses the result FILE pointer right away without the NULL > check. Let's use xfopen() and die if we could not open the file. That's > still better than crashing, > > Signed-off-by: Nguyễn Thái Ngọc Duy While funny to read, maybe it would be better to spell it out clearly: copy_alternates() called fopen() without handling errors. By switching to xfopen(), this bug is fixed. Ciao, Dscho