summaryrefslogtreecommitdiff
path: root/gobject/glib-mkenums.in
diff options
context:
space:
mode:
authorSam Spilsbury <sam@endlessm.com>2018-03-19 04:58:08 +0800
committerPhilip Withnall <withnall@endlessm.com>2018-03-21 15:05:36 +0000
commit5e02a9f8afd4bdb1c49bc12f367fd46572934c15 (patch)
tree0f2a866d7a469794fd56587edd48c83238cd0d71 /gobject/glib-mkenums.in
parent7027a128c1a10904810f3cf0fb9f5c5e325082e1 (diff)
downloadglib-5e02a9f8afd4bdb1c49bc12f367fd46572934c15.tar.gz
glib-mkenums: Don't go into an infinite loop trying to find a matching {
If we reach EOF before this happens, error out as opposed to looping around forever. https://bugzilla.gnome.org/show_bug.cgi?id=794506
Diffstat (limited to 'gobject/glib-mkenums.in')
-rwxr-xr-xgobject/glib-mkenums.in2
1 files changed, 2 insertions, 0 deletions
diff --git a/gobject/glib-mkenums.in b/gobject/glib-mkenums.in
index 61466be06..fe9a10756 100755
--- a/gobject/glib-mkenums.in
+++ b/gobject/glib-mkenums.in
@@ -495,6 +495,8 @@ def process_file(curfilename):
if groups[0] is None and (len(groups) < 4 or groups[3] is None):
while True:
line = curfile.readline()
+ if not line:
+ print_error("Syntax error when looking for opening { in enum")
if re.match(r'\s*\{', line):
break