diff options
author | Wenji Huang <wenji.huang@oracle.com> | 2008-11-13 20:54:39 -0500 |
---|---|---|
committer | Wenji Huang <wenji.huang@oracle.com> | 2008-11-13 20:54:39 -0500 |
commit | 1f5490d125bdb76179724ddd989569734235d185 (patch) | |
tree | e2966a0e4b1ed475ba8b83ba43857a84531f5d75 | |
parent | 6b2ad26cd43923b8868b134a5d0bd82453d5e0b5 (diff) | |
download | systemtap-steved-1f5490d125bdb76179724ddd989569734235d185.tar.gz systemtap-steved-1f5490d125bdb76179724ddd989569734235d185.tar.xz systemtap-steved-1f5490d125bdb76179724ddd989569734235d185.zip |
PR7000: Add checking bound for actual parameters.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | translate.cxx | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -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(); } |