diff options
author | John Baldwin <jhb@FreeBSD.org> | 2015-12-17 20:42:05 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2015-12-17 20:42:05 +0000 |
commit | b128c3c3959b92fe641f57035e10b87d3cdb7e1c (patch) | |
tree | 31a1990649f0990c39bfa1fdb38c488d5ed51ec9 | |
parent | 544f1677473dacbae33495d66bc2e92d40e2c0b5 (diff) | |
download | src-b128c3c3959b92fe641f57035e10b87d3cdb7e1c.tar.gz src-b128c3c3959b92fe641f57035e10b87d3cdb7e1c.zip |
Notes
-rw-r--r-- | usr.sbin/boot0cfg/boot0cfg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/boot0cfg/boot0cfg.c b/usr.sbin/boot0cfg/boot0cfg.c index 2602e5075494..20b615a218ca 100644 --- a/usr.sbin/boot0cfg/boot0cfg.c +++ b/usr.sbin/boot0cfg/boot0cfg.c @@ -337,6 +337,8 @@ read_mbr(const char *disk, u_int8_t **mbr, int check_version) return (mbr_size); } *mbr = malloc(sizeof(buf)); + if (mbr == NULL) + errx(1, "%s: unable to allocate MBR buffer", disk); memcpy(*mbr, buf, sizeof(buf)); close(fd); |