summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenji Huang <wenji.huang@oracle.com>2008-11-13 20:54:39 -0500
committerWenji Huang <wenji.huang@oracle.com>2008-11-13 20:54:39 -0500
commit1f5490d125bdb76179724ddd989569734235d185 (patch)
treee2966a0e4b1ed475ba8b83ba43857a84531f5d75
parent6b2ad26cd43923b8868b134a5d0bd82453d5e0b5 (diff)
downloadsystemtap-steved-1f5490d125bdb76179724ddd989569734235d185.tar.gz
systemtap-steved-1f5490d125bdb76179724ddd989569734235d185.tar.xz
systemtap-steved-1f5490d125bdb76179724ddd989569734235d185.zip
PR7000: Add checking bound for actual parameters.
-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();
}