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
spbro
OpenXG-RAN
Commits
11270af8
Commit
11270af8
authored
Feb 28, 2021
by
Michael Cook
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eNB_scheduler_ulsch.c: Range checking on array access
-fsanitize=address complained about this code.
parent
706f0e44
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
+7
-1
No files found.
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
View file @
11270af8
...
...
@@ -403,7 +403,13 @@ rx_sdu(const module_id_t enb_mod_idP,
switch
(
rx_ces
[
i
])
{
// implement and process PHR + CRNTI + BSR
case
POWER_HEADROOM
:
if
(
UE_id
!=
-
1
)
{
UE_template_ptr
->
phr_info
=
(
payload_ptr
[
0
]
&
0x3f
)
-
PHR_MAPPING_OFFSET
+
(
int8_t
)(
hundred_times_log10_NPRB
[
UE_template_ptr
->
nb_rb_ul
[
harq_pid
]
-
1
]
/
100
);
uint16_t
nb_rb_ul
=
UE_template_ptr
->
nb_rb_ul
[
harq_pid
];
if
(
nb_rb_ul
<
1
||
nb_rb_ul
>
sizeof
(
hundred_times_log10_NPRB
)
/
sizeof
(
hundred_times_log10_NPRB
[
0
]))
{
LOG_E
(
MAC
,
"invalid nb_rb_ul=%u for harq_pid=%u
\n
"
,
nb_rb_ul
,
harq_pid
);
break
;
}
UE_template_ptr
->
phr_info
=
(
payload_ptr
[
0
]
&
0x3f
)
-
PHR_MAPPING_OFFSET
+
(
int8_t
)(
hundred_times_log10_NPRB
[
nb_rb_ul
-
1
]
/
100
);
if
(
UE_template_ptr
->
phr_info
>
40
)
{
UE_template_ptr
->
phr_info
=
40
;
...
...
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