summaryrefslogtreecommitdiff
path: root/giscanner/scannerparser.y
diff options
context:
space:
mode:
authorJohan Dahlin <johan@gnome.org>2008-10-24 09:17:02 +0000
committerJohan Dahlin <johan@src.gnome.org>2008-10-24 09:17:02 +0000
commitb7a91efb9ba46ba9d2df440681beed3b8007c80c (patch)
treecd1f176daa5caf37ac6e96ac7c1399c4ba712481 /giscanner/scannerparser.y
parenta23d9b33d2b8436b60f9e5da04f0bea52c5a2a24 (diff)
downloadgobject-introspection-b7a91efb9ba46ba9d2df440681beed3b8007c80c.tar.gz
Check against division by zero for the modula operator. This fixes header
2008-10-24 Johan Dahlin <johan@gnome.org> * giscanner/scannerparser.y: Check against division by zero for the modula operator. This fixes header parsing of OSX system headers included by libsoup. svn path=/trunk/; revision=804
Diffstat (limited to 'giscanner/scannerparser.y')
-rw-r--r--giscanner/scannerparser.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/giscanner/scannerparser.y b/giscanner/scannerparser.y
index 21151bd1..e3ca20e2 100644
--- a/giscanner/scannerparser.y
+++ b/giscanner/scannerparser.y
@@ -352,7 +352,9 @@ multiplicative_expression
{
$$ = gi_source_symbol_new (CSYMBOL_TYPE_CONST);
$$->const_int_set = TRUE;
- $$->const_int = $1->const_int % $3->const_int;
+ if ($3->const_int != 0) {
+ $$->const_int = $1->const_int % $3->const_int;
+ }
}
;