Yacc patch
Michael Neumann
mneumann at ntecs.de
Thu Jul 10 11:50:26 PDT 2008
Hi,
An old bug recently discovered by an OpenBSD developer:
http://undeadly.org/cgi?action=article&sid=20080708155228&mode=flat&count=13
Here's the patch for DragonFly.
Regards,
Michael
Index: skeleton.c
===================================================================
RCS file: /home/dcvs/src/usr.bin/yacc/skeleton.c,v
retrieving revision 1.6
diff -u -r1.6 skeleton.c
--- skeleton.c 22 Jan 2006 13:38:50 -0000 1.6
+++ skeleton.c 9 Jul 2008 22:09:51 -0000
@@ -313,6 +313,10 @@
" YYPREFIX, yystate, yyn, yyrule[yyn]);",
"#endif",
" yym = yylen[yyn];",
+ " if (yym)",
+ " yyval = yyvsp[1-yym];",
+ " else",
+ " memset(&yyval, 0, sizeof yyval);",
" yyval = yyvsp[1-yym];",
" switch (yyn)",
" {",
More information about the Submit
mailing list