1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-09 14:11:29 +00:00

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.
This commit is contained in:
dmiller
2016-03-21 14:20:20 +00:00
parent 2b86ab11dc
commit dcfd7562f2

View File

@@ -343,7 +343,7 @@ class WindowConfig(UmitConfigParser, object):
return value return value
def set_x(self, x): def set_x(self, x):
self._set_it("x", x) self._set_it("x", "%d" % x)
def get_y(self): def get_y(self):
try: try:
@@ -353,7 +353,7 @@ class WindowConfig(UmitConfigParser, object):
return value return value
def set_y(self, y): def set_y(self, y):
self._set_it("y", y) self._set_it("y", "%d" % y)
def get_width(self): def get_width(self):
try: try:
@@ -367,7 +367,7 @@ class WindowConfig(UmitConfigParser, object):
return value return value
def set_width(self, width): def set_width(self, width):
self._set_it("width", width) self._set_it("width", "%d" % width)
def get_height(self): def get_height(self):
try: try:
@@ -381,7 +381,7 @@ class WindowConfig(UmitConfigParser, object):
return value return value
def set_height(self, height): def set_height(self, height):
self._set_it("height", height) self._set_it("height", "%d" % height)
x = property(get_x, set_x) x = property(get_x, set_x)
y = property(get_y, set_y) y = property(get_y, set_y)