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
ZhouShuya
OpenXG-RAN
Commits
456e6c92
Commit
456e6c92
authored
Jun 16, 2020
by
matzakos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change return type of nr_generate_ulsch_pdu() to avoid overflow on the offset variable
parent
45ed1e80
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
4 deletions
+5
-4
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+1
-1
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+4
-3
No files found.
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
456e6c92
...
...
@@ -139,7 +139,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
NR_UL_TIME_ALIGNMENT_t
*
ul_time_alignment
);
u
nsigned
char
nr_generate_ulsch_pdu
(
uint8_t
*
sdus_payload
,
u
int16_t
nr_generate_ulsch_pdu
(
uint8_t
*
sdus_payload
,
uint8_t
*
pdu
,
uint8_t
num_sdus
,
uint16_t
*
sdu_lengths
,
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
456e6c92
...
...
@@ -3723,7 +3723,7 @@ void nr_ue_process_mac_pdu(module_id_t module_idP,
/////* ULSCH MAC PDU generation (6.1.2 TS 38.321) */////
////////////////////////////////////////////////////////
u
nsigned
char
nr_generate_ulsch_pdu
(
uint8_t
*
sdus_payload
,
u
int16_t
nr_generate_ulsch_pdu
(
uint8_t
*
sdus_payload
,
uint8_t
*
pdu
,
uint8_t
num_sdus
,
uint16_t
*
sdu_lengths
,
...
...
@@ -3738,7 +3738,8 @@ unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload,
NR_MAC_SUBHEADER_FIXED
*
mac_pdu_ptr
=
(
NR_MAC_SUBHEADER_FIXED
*
)
pdu
;
unsigned
char
last_size
=
0
,
i
,
mac_header_control_elements
[
16
],
*
ce_ptr
,
bsr
=
0
;
int
mac_ce_size
,
offset
;
int
mac_ce_size
;
uint16_t
offset
=
0
;
LOG_D
(
MAC
,
"[UE] Generating ULSCH PDU : num_sdus %d
\n
"
,
num_sdus
);
...
...
@@ -3888,7 +3889,7 @@ unsigned char nr_generate_ulsch_pdu(uint8_t *sdus_payload,
// compute final offset
offset
=
((
unsigned
char
*
)
mac_pdu_ptr
-
pdu
);
//printf("Offset %d \n", ((unsigned char *) mac_pdu_ptr -
mac_
pdu));
//printf("Offset %d \n", ((unsigned char *) mac_pdu_ptr - pdu));
return
offset
;
}
...
...
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