Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
ao gleen
OpenXG-RAN
Commits
29220a60
Commit
29220a60
authored
Nov 11, 2024
by
Guido Casati
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check on minimum length in encode_5gs_mobile_identity
parent
bf776113
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
openair3/NAS/COMMON/IES/FGSMobileIdentity.c
openair3/NAS/COMMON/IES/FGSMobileIdentity.c
+7
-0
No files found.
openair3/NAS/COMMON/IES/FGSMobileIdentity.c
View file @
29220a60
...
...
@@ -37,6 +37,8 @@
#include "TLVDecoder.h"
#include "FGSMobileIdentity.h"
#define MIN_LEN_FGS_MOBILE_ID_IE 3 // type of identity "No identity"
static
int
decode_guti_5gs_mobile_identity
(
Guti5GSMobileIdentity_t
*
guti
,
const
uint8_t
*
buffer
);
static
int
encode_guti_5gs_mobile_identity
(
Guti5GSMobileIdentity_t
*
guti
,
uint8_t
*
buffer
);
...
...
@@ -77,6 +79,10 @@ int decode_5gs_mobile_identity(FGSMobileIdentity *fgsmobileidentity, uint8_t iei
int
encode_5gs_mobile_identity
(
FGSMobileIdentity
*
fgsmobileidentity
,
uint8_t
iei
,
uint8_t
*
buffer
,
uint32_t
len
)
{
// Return if buffer is shorter than min length
if
(
len
<
MIN_LEN_FGS_MOBILE_ID_IE
)
return
-
1
;
int
encoded_rc
=
TLV_ENCODE_VALUE_DOESNT_MATCH
;
uint32_t
encoded
=
0
;
...
...
@@ -86,6 +92,7 @@ int encode_5gs_mobile_identity(FGSMobileIdentity *fgsmobileidentity, uint8_t iei
}
encoded
=
encoded
+
2
;
len
-=
encoded
;
if
(
fgsmobileidentity
->
guti
.
typeofidentity
==
FGS_MOBILE_IDENTITY_5G_GUTI
)
{
encoded_rc
=
encode_guti_5gs_mobile_identity
(
&
fgsmobileidentity
->
guti
,
...
...
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