Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sepolicy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
platform
system
sepolicy
Commits
91bde1d7
Commit
91bde1d7
authored
Sep 27, 2018
by
Treehugger Robot
Committed by
Gerrit Code Review
Sep 27, 2018
Browse files
Options
Downloads
Plain Diff
Merge "gracefully handle hashtab_search failures"
parents
dbddbe42
bb880a28
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/sepol_wrap.cpp
+6
-1
6 additions, 1 deletion
tests/sepol_wrap.cpp
with
6 additions
and
1 deletion
tests/sepol_wrap.cpp
+
6
−
1
View file @
91bde1d7
...
@@ -116,6 +116,11 @@ void *init_type_iter(void *policydbp, const char *type, bool is_attr)
...
@@ -116,6 +116,11 @@ void *init_type_iter(void *policydbp, const char *type, bool is_attr)
}
else
{
}
else
{
out
->
alltypes
=
TYPE_ITER_LOOKUP
;
out
->
alltypes
=
TYPE_ITER_LOOKUP
;
out
->
d
=
static_cast
<
type_datum
*>
(
hashtab_search
(
db
->
p_types
.
table
,
type
));
out
->
d
=
static_cast
<
type_datum
*>
(
hashtab_search
(
db
->
p_types
.
table
,
type
));
if
(
out
->
d
==
nullptr
)
{
std
::
cerr
<<
"
\"
"
<<
type
<<
"
\"
does not exist"
<<
std
::
endl
;
free
(
out
);
return
nullptr
;
}
if
(
is_attr
&&
out
->
d
->
flavor
!=
TYPE_ATTRIB
)
{
if
(
is_attr
&&
out
->
d
->
flavor
!=
TYPE_ATTRIB
)
{
std
::
cerr
<<
"
\"
"
<<
type
<<
"
\"
MUST be an attribute in the policy"
<<
std
::
endl
;
std
::
cerr
<<
"
\"
"
<<
type
<<
"
\"
MUST be an attribute in the policy"
<<
std
::
endl
;
free
(
out
);
free
(
out
);
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment