summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--translate.cxx2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index cffcbe79..e90b9f82 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-11-13 Wenji Huang <wenji.huang@oracle.com>
+
+ PR 7000
+ * translate.cxx (c_unparser::visit_print_format): Add checking bound
+ for actual parameters.
+
2008-11-13 Frank Ch. Eigler <fche@elastic.org>
* systemtap.spec, configure.ac: Bump version to 0.8.
diff --git a/translate.cxx b/translate.cxx
index 41128554..741455e0 100644
--- a/translate.cxx
+++ b/translate.cxx
@@ -4199,7 +4199,7 @@ c_unparser::visit_print_format (print_format* e)
/* The type of the %c argument is 'int'. */
else if (components[i].type == print_format::conv_char)
o->line() << ", (int)" << tmp[arg_ix++].value();
- else
+ else if (arg_ix < (int) tmp.size())
o->line() << ", " << tmp[arg_ix++].value();
}