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
38a91df0
Commit
38a91df0
authored
Sep 17, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove undefined behavior
parent
a9e63373
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
skeletons/INTEGER.c
skeletons/INTEGER.c
+6
-5
skeletons/asn_bit_data.c
skeletons/asn_bit_data.c
+1
-1
No files found.
skeletons/INTEGER.c
View file @
38a91df0
...
@@ -633,13 +633,14 @@ INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t
...
@@ -633,13 +633,14 @@ INTEGER_decode_uper(const asn_codec_ctx_t *opt_codec_ctx, asn_TYPE_descriptor_t
if
(
asn_ulong2INTEGER
(
st
,
uvalue
))
if
(
asn_ulong2INTEGER
(
st
,
uvalue
))
ASN__DECODE_FAILED
;
ASN__DECODE_FAILED
;
}
else
{
}
else
{
unsigned
long
svalue
=
0
;
unsigned
long
uvalue
=
0
;
long
svalue
;
if
(
uper_get_constrained_whole_number
(
pd
,
if
(
uper_get_constrained_whole_number
(
pd
,
&
s
value
,
ct
->
range_bits
))
&
u
value
,
ct
->
range_bits
))
ASN__DECODE_STARVED
;
ASN__DECODE_STARVED
;
ASN_DEBUG
(
"Got value %l
d
+ low %ld"
,
ASN_DEBUG
(
"Got value %l
u
+ low %ld"
,
s
value
,
ct
->
lower_bound
);
u
value
,
ct
->
lower_bound
);
svalue
+=
ct
->
lower_bound
;
svalue
=
ct
->
lower_bound
+
(
long
)
uvalue
;
if
(
asn_long2INTEGER
(
st
,
svalue
))
if
(
asn_long2INTEGER
(
st
,
svalue
))
ASN__DECODE_FAILED
;
ASN__DECODE_FAILED
;
}
}
...
...
skeletons/asn_bit_data.c
View file @
38a91df0
...
@@ -86,7 +86,7 @@ asn_get_few_bits(asn_bit_data_t *pd, int nbits) {
...
@@ -86,7 +86,7 @@ asn_get_few_bits(asn_bit_data_t *pd, int nbits) {
else
if
(
off
<=
24
)
else
if
(
off
<=
24
)
accum
=
((
buf
[
0
]
<<
16
)
+
(
buf
[
1
]
<<
8
)
+
buf
[
2
])
>>
(
24
-
off
);
accum
=
((
buf
[
0
]
<<
16
)
+
(
buf
[
1
]
<<
8
)
+
buf
[
2
])
>>
(
24
-
off
);
else
if
(
off
<=
31
)
else
if
(
off
<=
31
)
accum
=
((
buf
[
0
]
<<
24
)
+
(
buf
[
1
]
<<
16
)
accum
=
((
(
uint32_t
)
buf
[
0
]
<<
24
)
+
(
buf
[
1
]
<<
16
)
+
(
buf
[
2
]
<<
8
)
+
(
buf
[
3
]))
>>
(
32
-
off
);
+
(
buf
[
2
]
<<
8
)
+
(
buf
[
3
]))
>>
(
32
-
off
);
else
if
(
nbits
<=
31
)
{
else
if
(
nbits
<=
31
)
{
asn_bit_data_t
tpd
=
*
pd
;
asn_bit_data_t
tpd
=
*
pd
;
...
...
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