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
8d06d92d
Commit
8d06d92d
authored
Mar 14, 2018
by
Vasil Velichkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xer: Fix decoding of big unsigned long values on 32bit platforms
parent
f5dc5cc6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
skeletons/INTEGER.c
skeletons/INTEGER.c
+5
-1
No files found.
skeletons/INTEGER.c
View file @
8d06d92d
...
@@ -324,6 +324,8 @@ INTEGER_st_prealloc(INTEGER_t *st, int min_size) {
...
@@ -324,6 +324,8 @@ INTEGER_st_prealloc(INTEGER_t *st, int min_size) {
static
enum
xer_pbd_rval
static
enum
xer_pbd_rval
INTEGER__xer_body_decode
(
const
asn_TYPE_descriptor_t
*
td
,
void
*
sptr
,
INTEGER__xer_body_decode
(
const
asn_TYPE_descriptor_t
*
td
,
void
*
sptr
,
const
void
*
chunk_buf
,
size_t
chunk_size
)
{
const
void
*
chunk_buf
,
size_t
chunk_size
)
{
const
asn_INTEGER_specifics_t
*
specs
=
(
const
asn_INTEGER_specifics_t
*
)
td
->
specifics
;
INTEGER_t
*
st
=
(
INTEGER_t
*
)
sptr
;
INTEGER_t
*
st
=
(
INTEGER_t
*
)
sptr
;
intmax_t
dec_value
;
intmax_t
dec_value
;
intmax_t
hex_value
=
0
;
intmax_t
hex_value
=
0
;
...
@@ -505,7 +507,9 @@ INTEGER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr,
...
@@ -505,7 +507,9 @@ INTEGER__xer_body_decode(const asn_TYPE_descriptor_t *td, void *sptr,
/* The last symbol encountered was a digit. */
/* The last symbol encountered was a digit. */
switch
(
asn_strtoimax_lim
(
dec_value_start
,
&
dec_value_end
,
&
dec_value
))
{
switch
(
asn_strtoimax_lim
(
dec_value_start
,
&
dec_value_end
,
&
dec_value
))
{
case
ASN_STRTOX_OK
:
case
ASN_STRTOX_OK
:
if
(
dec_value
>=
LONG_MIN
&&
dec_value
<=
LONG_MAX
)
{
if
(
specs
&&
specs
->
field_unsigned
&&
dec_value
<=
ULONG_MAX
)
{
break
;
}
else
if
(
dec_value
>=
LONG_MIN
&&
dec_value
<=
LONG_MAX
)
{
break
;
break
;
}
else
{
}
else
{
/*
/*
...
...
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