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
Michael Black
OpenXG-RAN
Commits
a1ec989d
Commit
a1ec989d
authored
Jan 18, 2021
by
Melissa Elkadi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added array index checks and local loop variable
parent
48662ed5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
openair2/PHY_INTERFACE/phy_stub_UE.c
openair2/PHY_INTERFACE/phy_stub_UE.c
+9
-3
No files found.
openair2/PHY_INTERFACE/phy_stub_UE.c
View file @
a1ec989d
...
...
@@ -1948,8 +1948,10 @@ char *nfapi_ul_config_req_to_string(nfapi_ul_config_request_t *req)
abort
();
}
for
(
int
n
=
0
;
n
<
sf_rnti_mcs
[
sf
].
pdu_size
;
n
++
)
int
pdu_size
=
sf_rnti_mcs
[
sf
].
pdu_size
;
for
(
int
n
=
0
;
n
<
pdu_size
;
n
++
)
{
assert
(
n
<
sizeof
(
sf_rnti_mcs
[
sf
].
drop_flag
));
if
(
sf_rnti_mcs
[
sf
].
rnti
[
n
]
==
rnti
)
{
return
sf_rnti_mcs
[
sf
].
drop_flag
[
n
];
...
...
@@ -1970,8 +1972,10 @@ char *nfapi_ul_config_req_to_string(nfapi_ul_config_request_t *req)
uint8_t
mcs
=
99
;
int
n
=
0
;
for
(
n
=
0
;
n
<
sf_rnti_mcs
[
sf
].
pdu_size
;
n
++
)
int
pdu_size
=
sf_rnti_mcs
[
sf
].
pdu_size
;
for
(
n
=
0
;
n
<
pdu_size
;
n
++
)
{
assert
(
n
<
sizeof
(
sf_rnti_mcs
[
sf
].
drop_flag
)
&&
n
<
sizeof
(
sf_rnti_mcs
[
sf
].
mcs
)
&&
n
<
sizeof
(
sf_rnti_mcs
[
sf
].
rnti
));
if
(
sf_rnti_mcs
[
sf
].
rnti
[
n
]
==
rnti
)
{
mcs
=
sf_rnti_mcs
[
sf
].
mcs
[
n
];
...
...
@@ -2045,10 +2049,12 @@ char *nfapi_ul_config_req_to_string(nfapi_ul_config_request_t *req)
double
drop_cutoff
=
((
double
)
rand
()
/
(
RAND_MAX
));
assert
(
drop_cutoff
<
1
);
bler_val
=
0
.
6
;
if
(
bler_val
<
=
drop_cutoff
)
if
(
bler_val
>
=
drop_cutoff
)
{
sf_rnti_mcs
[
sf
].
drop_flag
[
n
]
=
true
;
LOG_D
(
MAC
,
"We are dropping this packet. Bler_val = %f, MCS = %"
PRIu8
", sf = %d
\n
"
,
bler_val
,
sf_rnti_mcs
[
sf
].
mcs
[
n
],
sf
);
}
return
sf_rnti_mcs
[
sf
].
drop_flag
[
n
];
}
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