Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
f7b1fb34
Commit
f7b1fb34
authored
Sep 21, 2018
by
Teng Qin
Committed by
GitHub
Sep 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1982 from iovisor/yhs_dev
prevent array subscript expression if base/index is not rewritable
parents
c7ccd5b7
a6d7e3af
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
src/cc/frontends/clang/b_frontend_action.cc
src/cc/frontends/clang/b_frontend_action.cc
+6
-0
No files found.
src/cc/frontends/clang/b_frontend_action.cc
View file @
f7b1fb34
...
@@ -505,6 +505,12 @@ bool ProbeVisitor::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
...
@@ -505,6 +505,12 @@ bool ProbeVisitor::VisitArraySubscriptExpr(ArraySubscriptExpr *E) {
Expr
*
idx
=
E
->
getIdx
();
Expr
*
idx
=
E
->
getIdx
();
memb_visited_
.
insert
(
E
);
memb_visited_
.
insert
(
E
);
if
(
!
rewriter_
.
isRewritable
(
GET_BEGINLOC
(
base
)))
return
true
;
if
(
!
rewriter_
.
isRewritable
(
GET_BEGINLOC
(
idx
)))
return
true
;
string
pre
,
lbracket
,
rbracket
;
string
pre
,
lbracket
,
rbracket
;
LangOptions
opts
;
LangOptions
opts
;
SourceLocation
lbracket_start
,
lbracket_end
;
SourceLocation
lbracket_start
,
lbracket_end
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment