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
deedbc37
Commit
deedbc37
authored
Oct 27, 2021
by
Raphael Riebl
Committed by
Mouse
Nov 01, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
uper: fix encoding of constrained integers
On 32bit architectures the MSBs were truncated
parent
9ee68e63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
skeletons/uper_support.c
skeletons/uper_support.c
+1
-1
skeletons/uper_support.h
skeletons/uper_support.h
+1
-1
No files found.
skeletons/uper_support.c
View file @
deedbc37
...
...
@@ -148,7 +148,7 @@ int uper_get_constrained_whole_number(asn_per_data_t *pd, uintmax_t *out_value,
/* X.691-2008/11, #11.5.6 -> #11.3 */
int
uper_put_constrained_whole_number_u
(
asn_per_outp_t
*
po
,
u
nsigned
long
v
,
uper_put_constrained_whole_number_u
(
asn_per_outp_t
*
po
,
u
intmax_t
v
,
int
nbits
)
{
if
(
nbits
<=
31
)
{
return
per_put_few_bits
(
po
,
v
,
nbits
);
...
...
skeletons/uper_support.h
View file @
deedbc37
...
...
@@ -46,7 +46,7 @@ int per_long_range_unrebase(unsigned long inp, intmax_t lb, intmax_t ub, long *o
int
per_imax_range_unrebase
(
uintmax_t
inp
,
intmax_t
lb
,
intmax_t
ub
,
intmax_t
*
outp
);
/* X.691-2008/11, #11.5 */
int
uper_put_constrained_whole_number_u
(
asn_per_outp_t
*
po
,
u
nsigned
long
v
,
int
nbits
);
int
uper_put_constrained_whole_number_u
(
asn_per_outp_t
*
po
,
u
intmax_t
v
,
int
nbits
);
/*
* X.691 (08/2015) #11.9 "General rules for encoding a length determinant"
...
...
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