From 07b6f997d19ce19197604ffc7b123497d635405c Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Wed, 26 Jul 2017 14:06:15 -0500 Subject: app-emulation/qemu: Bugfix: Fix patch file Package-Manager: Portage-2.3.6, Repoman-2.3.3 --- .../qemu/files/qemu-2.9.0-CVE-2017-7539.patch | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app-emulation/qemu/files/qemu-2.9.0-CVE-2017-7539.patch b/app-emulation/qemu/files/qemu-2.9.0-CVE-2017-7539.patch index 3af16977b93b..ee77a59373e1 100644 --- a/app-emulation/qemu/files/qemu-2.9.0-CVE-2017-7539.patch +++ b/app-emulation/qemu/files/qemu-2.9.0-CVE-2017-7539.patch @@ -375,25 +375,25 @@ index 924a1fe..a1f106b 100644 magic = cpu_to_be64(NBD_REP_MAGIC); - if (nbd_negotiate_write(ioc, &magic, sizeof(magic)) != sizeof(magic)) { -+ if (nbd_write(ioc, &magic, sizeof(magic), NULL) < 0) { ++ if (write_sync(ioc, &magic, sizeof(magic), NULL) < 0) { LOG("write failed (rep magic)"); return -EINVAL; } opt = cpu_to_be32(opt); - if (nbd_negotiate_write(ioc, &opt, sizeof(opt)) != sizeof(opt)) { -+ if (nbd_write(ioc, &opt, sizeof(opt), NULL) < 0) { ++ if (write_sync(ioc, &opt, sizeof(opt), NULL) < 0) { LOG("write failed (rep opt)"); return -EINVAL; } type = cpu_to_be32(type); - if (nbd_negotiate_write(ioc, &type, sizeof(type)) != sizeof(type)) { -+ if (nbd_write(ioc, &type, sizeof(type), NULL) < 0) { ++ if (write_sync(ioc, &type, sizeof(type), NULL) < 0) { LOG("write failed (rep type)"); return -EINVAL; } len = cpu_to_be32(len); - if (nbd_negotiate_write(ioc, &len, sizeof(len)) != sizeof(len)) { -+ if (nbd_write(ioc, &len, sizeof(len), NULL) < 0) { ++ if (write_sync(ioc, &len, sizeof(len), NULL) < 0) { LOG("write failed (rep data length)"); return -EINVAL; } @@ -402,7 +402,7 @@ index 924a1fe..a1f106b 100644 goto out; } - if (nbd_negotiate_write(ioc, msg, len) != len) { -+ if (nbd_write(ioc, msg, len, NULL) < 0) { ++ if (write_sync(ioc, msg, len, NULL) < 0) { LOG("write failed (error message)"); ret = -EIO; } else { @@ -411,17 +411,17 @@ index 924a1fe..a1f106b 100644 len = cpu_to_be32(name_len); - if (nbd_negotiate_write(ioc, &len, sizeof(len)) != sizeof(len)) { -+ if (nbd_write(ioc, &len, sizeof(len), NULL) < 0) { ++ if (write_sync(ioc, &len, sizeof(len), NULL) < 0) { LOG("write failed (name length)"); return -EINVAL; } - if (nbd_negotiate_write(ioc, name, name_len) != name_len) { -+ if (nbd_write(ioc, name, name_len, NULL) < 0) { ++ if (write_sync(ioc, name, name_len, NULL) < 0) { LOG("write failed (name buffer)"); return -EINVAL; } - if (nbd_negotiate_write(ioc, desc, desc_len) != desc_len) { -+ if (nbd_write(ioc, desc, desc_len, NULL) < 0) { ++ if (write_sync(ioc, desc, desc_len, NULL) < 0) { LOG("write failed (description buffer)"); return -EINVAL; } @@ -524,13 +524,13 @@ index 924a1fe..a1f106b 100644 goto fail; } - if (nbd_negotiate_write(client->ioc, buf, sizeof(buf)) != sizeof(buf)) { -+ if (nbd_write(client->ioc, buf, sizeof(buf), NULL) < 0) { ++ if (write_sync(client->ioc, buf, sizeof(buf), NULL) < 0) { LOG("write failed"); goto fail; } } else { - if (nbd_negotiate_write(client->ioc, buf, 18) != 18) { -+ if (nbd_write(client->ioc, buf, 18, NULL) < 0) { ++ if (write_sync(client->ioc, buf, 18, NULL) < 0) { LOG("write failed"); goto fail; } @@ -539,7 +539,7 @@ index 924a1fe..a1f106b 100644 stw_be_p(buf + 26, client->exp->nbdflags | myflags); len = client->no_zeroes ? 10 : sizeof(buf) - 18; - if (nbd_negotiate_write(client->ioc, buf + 18, len) != len) { -+ if (nbd_write(client->ioc, buf + 18, len, NULL) < 0) { ++ if (write_sync(client->ioc, buf + 18, len, NULL) < 0) { LOG("write failed"); goto fail; } -- cgit v1.2.3-65-gdbad