Commit
99eda42 fixed agerr() format string issue in yyerror(), but the
same fix is also needed for chkNum(). In chkNum(), format string can be
injected at least via malicious file name:
$ cat fs4-%n%s%s%s%s%s%s.dot
graph G { a [ weight = 0g ] }
$ dot fs4-%n%s%s%s%s%s%s.dot
Warning: *** %n in writable segment detected ***
Aborted
agxbput(&xb,buf);
agxbput(&xb,fname);
agxbput(&xb, " splits into two tokens\n");
- agerr(AGWARN,agxbuse(&xb));
+ agerr(AGWARN, "%s", agxbuse(&xb));
agxbfree(&xb);
return 1;