瀏覽代碼

Check for invalid XID

Marek Marczykowski 11 年之前
父節點
當前提交
1fda0502ab
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      core-modules/000QubesVm.py

+ 2 - 0
core-modules/000QubesVm.py

@@ -907,6 +907,8 @@ class QubesVm(object):
         if xid is None:
             xid = self.xid
 
+        assert xid >= 0, "Invalid XID value"
+
         domain_path = xs.get_domain_path(xid)
 
         # Set Xen Store entires with VM networking info: