Date: Thu, 20 Feb 2020 08:53:05 +0000 (UTC) From: Toomas Soome <tsoome@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r358158 - head/stand/efi/libefi Message-ID: <202002200853.01K8r56W055330@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tsoome Date: Thu Feb 20 08:53:04 2020 New Revision: 358158 URL: https://svnweb.freebsd.org/changeset/base/358158 Log: efihttp_fs_seek() is missing NULL pointer check Add missing check of malloc() result. Modified: head/stand/efi/libefi/efihttp.c Modified: head/stand/efi/libefi/efihttp.c ============================================================================== --- head/stand/efi/libefi/efihttp.c Thu Feb 20 08:48:34 2020 (r358157) +++ head/stand/efi/libefi/efihttp.c Thu Feb 20 08:53:04 2020 (r358158) @@ -701,6 +701,8 @@ efihttp_fs_seek(struct open_file *f, off_t offset, int return (0); if (where == SEEK_SET && fh->offset < offset) { buf = malloc(1500); + if (buf == NULL) + return (ENOMEM); res = offset - fh->offset; while (res > 0) { err = _efihttp_fs_read(f, buf, min(1500, res), &res2);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202002200853.01K8r56W055330>