Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aper: INTEGER longs to intmaxs #176

Merged
merged 1 commit into from Feb 7, 2024

Conversation

v0-e
Copy link

@v0-e v0-e commented Feb 6, 2024

Converts long and unsigned long variables/casts into intmax_t and uintmax_t, similarly to UPER encoder/decoder.
Increases INTEGER compatibility range for 32-bit architectures.

Fixes #175.

@mouse07410 mouse07410 merged commit ce10a57 into mouse07410:vlm_master Feb 7, 2024
1 check passed
acetcom added a commit to open5gs/open5gs that referenced this pull request Feb 12, 2024
APER encoding fails when using the asn_uint642INTEGER function on a 32-bit machine as shown below.

```C
   asn_uint642INTEGER(AMF_UE_NGAP_ID, 0xffffffff);
   ...
   aper_encode_to_buffer(...)
```

INTEGER APER encode/decode functions seem to be operating internally with long variables instead of intmax_t.
That is probably the reason of the failure.

@v0-e fixed this issues in the mouse07410/asn1c pull request.
mouse07410/asn1c#176
mouse07410/asn1c#177
acetcom added a commit to open5gs/open5gs that referenced this pull request Feb 12, 2024
APER encoding fails when using the asn_uint642INTEGER function on a 32-bit machine as shown below.

```C
   asn_uint642INTEGER(AMF_UE_NGAP_ID, 0xffffffff);
   ...
   aper_encode_to_buffer(...)
```

INTEGER APER encode/decode functions seem to be operating internally with long variables instead of intmax_t.
That is probably the reason of the failure.

@v0-e fixed this issues in the mouse07410/asn1c pull request.
mouse07410/asn1c#176
mouse07410/asn1c#177
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

APER encoding failed on a 32-bit machine
2 participants