PATCH [1/5]: pyblock: Check entries of the table list have the correct type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check entries of the table list have the correct type.
---
 dm.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/dm.c b/dm.c
index f279cb0..517e2fd 100644
--- a/dm.c
+++ b/dm.c
@@ -901,6 +901,13 @@ pydm_map_create(PydmMapObject *map, PyObject *table)
 		PydmTableObject *row =
 			(PydmTableObject *)PyList_GET_ITEM(table, i);

+		if (!PyObject_IsInstance((PyObject *)row,
+					 (PyObject *)&PydmTable_Type)) {
+			PyErr_SetString(PyExc_ValueError,
+				"invalid table type in table list");
+			dm_task_destroy(task);
+			return -1;
+		}
 		dm_task_add_target(task, row->start, row->size,
 				   row->type, row->params);
 		python_error_destroy_task(task, -1);
--
1.6.1.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux