Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
protobuf-c
Commits
9b899c9d
Commit
9b899c9d
authored
Apr 15, 2018
by
Sam Collinson
Committed by
Robert Edmonds
Aug 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check the return value of int_range_lookup before using as an array index; it can return -1
parent
8073f6ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
protobuf-c/protobuf-c.c
protobuf-c/protobuf-c.c
+4
-0
No files found.
protobuf-c/protobuf-c.c
View file @
9b899c9d
...
...
@@ -2239,6 +2239,8 @@ merge_messages(ProtobufCMessage *earlier_msg,
latter_msg
->
descriptor
->
field_ranges
,
*
earlier_case_p
);
if
(
field_index
<
0
)
return
FALSE
;
field
=
latter_msg
->
descriptor
->
fields
+
field_index
;
}
else
{
...
...
@@ -2632,6 +2634,8 @@ parse_oneof_member (ScannedMember *scanned_member,
int_range_lookup
(
message
->
descriptor
->
n_field_ranges
,
message
->
descriptor
->
field_ranges
,
*
oneof_case
);
if
(
field_index
<
0
)
return
FALSE
;
const
ProtobufCFieldDescriptor
*
old_field
=
message
->
descriptor
->
fields
+
field_index
;
size_t
el_size
=
sizeof_elt_in_repeated_array
(
old_field
->
type
);
...
...
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