svn commit: r358158 - head/stand/efi/libefi
Toomas Soome
tsoome at FreeBSD.org
Thu Feb 20 08:53:06 UTC 2020
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);
More information about the svn-src-head
mailing list