Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
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
asn1c
Commits
253cfcf2
Commit
253cfcf2
authored
Jul 27, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
early detection
parent
fa8b09da
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
skeletons/ber_tlv_length.c
skeletons/ber_tlv_length.c
+3
-2
No files found.
skeletons/ber_tlv_length.c
View file @
253cfcf2
...
...
@@ -51,13 +51,14 @@ ber_fetch_length(int _is_constructed, const void *bufptr, size_t size,
}
if
(
oct
==
0
)
{
ber_tlv_len_t
lenplusepsilon
=
len
+
1024
;
ber_tlv_len_t
lenplusepsilon
=
(
size_t
)
len
+
1024
;
/*
* Here length may be very close or equal to 2G.
* However, the arithmetics used in some decoders
* may add some (small) quantities to the length,
* to check the resulting value against some limits.
* This may result in integer wrap-around.
* This may result in integer wrap-around, which
* we try to avoid by checking it earlier here.
*/
if
(
lenplusepsilon
<
0
)
{
/* Too large length value */
...
...
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