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
cf04fa71
Unverified
Commit
cf04fa71
authored
Jun 20, 2020
by
Robert Edmonds
Committed by
GitHub
Jun 20, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #429 from protobuf-c/ilya-357
protobuf-c.c: Cast %lu args to unsigned long int
parents
bca6ced6
e43ed4f0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
protobuf-c/protobuf-c.c
protobuf-c/protobuf-c.c
+4
-2
No files found.
protobuf-c/protobuf-c.c
View file @
cf04fa71
...
...
@@ -2132,11 +2132,13 @@ scan_length_prefixed_data(size_t len, const uint8_t *data,
// Protobuf messages should always be less than 2 GiB in size.
// We also want to return early here so that hdr_len + val does
// not overflow on 32-bit systems.
PROTOBUF_C_UNPACK_ERROR
(
"length prefix of %lu is too large"
,
val
);
PROTOBUF_C_UNPACK_ERROR
(
"length prefix of %lu is too large"
,
(
unsigned
long
int
)
val
);
return
0
;
}
if
(
hdr_len
+
val
>
len
)
{
PROTOBUF_C_UNPACK_ERROR
(
"data too short after length-prefix of %lu"
,
val
);
PROTOBUF_C_UNPACK_ERROR
(
"data too short after length-prefix of %lu"
,
(
unsigned
long
int
)
val
);
return
0
;
}
return
hdr_len
+
val
;
...
...
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