blob: 34742f08a6c47e72d137997460be1c240ef895bd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
Fri Jun 23 15:48:34 2006 Arnold D. Robbins <arnold@skeeve.com>
* awkgram.y (subn): At end for `do_sprintf' check, verify that lnode is not NULL
before using it assign through.
--- gawk-3.1.5/awkgram.y.syntaxerror 2005-07-26 20:07:43.000000000 +0200
+++ gawk-3.1.5/awkgram.y 2006-06-23 17:43:55.000000000 +0200
@@ -2399,7 +2399,8 @@
r->subnode = subn;
if (r->builtin == do_sprintf) {
count_args(r);
- r->lnode->printf_count = r->printf_count; /* hack */
+ if (r->lnode != NULL) /* r->lnode set from subn. guard against syntax errors & check it's valid */
+ r->lnode->printf_count = r->printf_count; /* hack */
}
return r;
}
|