diff options
author | Josh Stone <jistone@redhat.com> | 2010-01-19 15:36:35 -0800 |
---|---|---|
committer | Josh Stone <jistone@redhat.com> | 2010-01-19 17:01:35 -0800 |
commit | 9300f661214a4f4dfac75878485867b30c7db389 (patch) | |
tree | 7d1408669fb7bd5fa648edbbd33707a7e8b094d0 /parse.h | |
parent | 596bbda30fd116c2d45c155ad347cc2d27186f3c (diff) | |
download | systemtap-steved-9300f661214a4f4dfac75878485867b30c7db389.tar.gz systemtap-steved-9300f661214a4f4dfac75878485867b30c7db389.tar.xz systemtap-steved-9300f661214a4f4dfac75878485867b30c7db389.zip |
PR11195: Prevent all nested argument substitution
Our existing protection only made sure that the first token in a
substitution wasn't a nested substitution. That's not sufficient when
there could be multiple tokens involved. This patch makes sure that no
nested tokens are ever allowed to be argument substitutions.
This also adds a cursor_suspended_line/column and resets the main
cursor_line/column to the beginning of the substitution, so errors will
point a little closer to the right place.
Diffstat (limited to 'parse.h')
-rw-r--r-- | parse.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -79,12 +79,14 @@ public: private: inline int input_get (); inline int input_peek (unsigned n=0); - void input_put (const std::string&); + void input_put (const std::string&, const token*); std::string input_name; std::string input_contents; const char *input_pointer; // index into input_contents const char *input_end; unsigned cursor_suspend_count; + unsigned cursor_suspend_line; + unsigned cursor_suspend_column; unsigned cursor_line; unsigned cursor_column; systemtap_session& session; |