]> git.armaanb.net Git - opendoas.git/commit
Fix memory corruption bug in rules parsing.
authorNathan Holstein <nathan.holstein@gmail.com>
Wed, 5 Aug 2015 04:38:16 +0000 (00:38 -0400)
committerNathan Holstein <nathan.holstein@gmail.com>
Wed, 5 Aug 2015 12:58:17 +0000 (08:58 -0400)
commit9dfca439576c43d28b117abf1bd96db9cc2a8a80
treec16a3c9fe0f5922dae95aff0f3f751f816be0af0
parentfed10b5bab6e9f6b3a06a7b3553dafa6157dce9c
Fix memory corruption bug in rules parsing.

Various yacc rules for optional configuration items weren't properly
setting the empty items to NULL. As a result, the rules list ends up
with invalid contents, including invalid string pointers.

This bug doesn't occur with OpenBSD's yacc, since it memset()s yyval
upon each reduce. GNU Bison doesn't have the matching memset(), and
thus the difference in behaviors.
doas.c
parse.y