Re: [PATCH 1/3] libxcmd: don't crash if el_gets returns null

Christoph Hellwig
2020-05-09T16:36:22Z

On Sat, May 09, 2020 at 09:29:37AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> el_gets returns NULL if it fails to read any characters (due to EOF or
> errors occurred). strdup will crash if it is fed a NULL string, so
> check the return value to avoid segfaulting.

Didn't I review this already?

Reviewed-by: Christoph Hellwig <hch@lst.de>