From dcfd7562f25f0d73d2eaca0b45ad0504bb9f86c5 Mon Sep 17 00:00:00 2001 From: dmiller Date: Mon, 21 Mar 2016 14:20:20 +0000 Subject: [PATCH] Avoid a crash in Zenmap config setting window geometry Report: http://seclists.org/nmap-dev/2016/q1/315 Fix: http://stackoverflow.com/a/21485083/1183387 We can't set integer (or non-string) values in a ConfigParser. --- zenmap/zenmapCore/UmitConf.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/zenmap/zenmapCore/UmitConf.py b/zenmap/zenmapCore/UmitConf.py index 3b7b7870b..c38e1ffaa 100644 --- a/zenmap/zenmapCore/UmitConf.py +++ b/zenmap/zenmapCore/UmitConf.py @@ -343,7 +343,7 @@ class WindowConfig(UmitConfigParser, object): return value def set_x(self, x): - self._set_it("x", x) + self._set_it("x", "%d" % x) def get_y(self): try: @@ -353,7 +353,7 @@ class WindowConfig(UmitConfigParser, object): return value def set_y(self, y): - self._set_it("y", y) + self._set_it("y", "%d" % y) def get_width(self): try: @@ -367,7 +367,7 @@ class WindowConfig(UmitConfigParser, object): return value def set_width(self, width): - self._set_it("width", width) + self._set_it("width", "%d" % width) def get_height(self): try: @@ -381,7 +381,7 @@ class WindowConfig(UmitConfigParser, object): return value def set_height(self, height): - self._set_it("height", height) + self._set_it("height", "%d" % height) x = property(get_x, set_x) y = property(get_y, set_y)