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
8601458e
Commit
8601458e
authored
Feb 14, 2015
by
Ilya Lipnitskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
protobuf-c.c: Don't crash when *_by_name fields in descriptors are NULL
parent
3b7d27a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
protobuf-c/protobuf-c.c
protobuf-c/protobuf-c.c
+9
-0
No files found.
protobuf-c/protobuf-c.c
View file @
8601458e
...
...
@@ -3381,6 +3381,9 @@ const ProtobufCEnumValue *
protobuf_c_enum_descriptor_get_value_by_name
(
const
ProtobufCEnumDescriptor
*
desc
,
const
char
*
name
)
{
if
(
desc
==
NULL
||
desc
->
values_by_name
==
NULL
)
return
NULL
;
unsigned
start
=
0
;
unsigned
count
=
desc
->
n_value_names
;
...
...
@@ -3416,6 +3419,9 @@ const ProtobufCFieldDescriptor *
protobuf_c_message_descriptor_get_field_by_name
(
const
ProtobufCMessageDescriptor
*
desc
,
const
char
*
name
)
{
if
(
desc
==
NULL
||
desc
->
fields_sorted_by_name
==
NULL
)
return
NULL
;
unsigned
start
=
0
;
unsigned
count
=
desc
->
n_fields
;
const
ProtobufCFieldDescriptor
*
field
;
...
...
@@ -3455,6 +3461,9 @@ const ProtobufCMethodDescriptor *
protobuf_c_service_descriptor_get_method_by_name
(
const
ProtobufCServiceDescriptor
*
desc
,
const
char
*
name
)
{
if
(
desc
==
NULL
||
desc
->
method_indices_by_name
==
NULL
)
return
NULL
;
unsigned
start
=
0
;
unsigned
count
=
desc
->
n_methods
;
...
...
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