]> git.proxmox.com Git - mirror_qemu.git/blobdiff - device_tree.c
virtio-scsi: restart DMA after iothread
[mirror_qemu.git] / device_tree.c
index 296278e12ae01020e7c0b8564587a7fa4d2dcf16..f8b46b3c7331ae42dcc3be5ee4c5ce3d370d47c6 100644 (file)
@@ -84,6 +84,10 @@ void *load_device_tree(const char *filename_path, int *sizep)
                      filename_path);
         goto fail;
     }
+    if (dt_size > INT_MAX / 2 - 10000) {
+        error_report("Device tree file '%s' is too large", filename_path);
+        goto fail;
+    }
 
     /* Expand to 2x size to give enough room for manipulation.  */
     dt_size += 10000;