Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
openairinterface5G
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
openairinterface5G
Commits
4e434ecf
Commit
4e434ecf
authored
2 years ago
by
Roberto Louro Magueta
Browse files
Options
Downloads
Patches
Plain Diff
Fix buffer overflow for SRS
parent
e28fccc7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
3 merge requests
!1757
Draft: Use pMAX value in configuration file, instead of hardcoded '23' in asn1_msg.c
,
!1682
integration_2022_wk35
,
!1680
Fix buffer overflow and division by 0 for SRS
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+5
-1
5 additions, 1 deletion
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
with
5 additions
and
1 deletion
openair1/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
+
5
−
1
View file @
4e434ecf
...
...
@@ -994,7 +994,11 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
while
(((
long
)
&
srs_estimated_channel_freq
[
0
][
nr_srs_info
->
sc_list
[
0
]
+
mem_offset
]
&
0xF
)
!=
0
)
{
mem_offset
++
;
}
int32_t
srs_est
[
frame_parms
->
ofdm_symbol_size
*
(
1
<<
srs_pdu
->
num_symbols
)
+
mem_offset
]
__attribute__
((
aligned
(
32
)));
// filt16_end is {4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0}
// The End of OFDM symbol corresponds to the position of last 16384 in the filter
// The multadd_real_vector_complex_scalar applies the remaining 8 zeros of filter, therefore, to avoid a buffer overflow,
// we added 8 in the array size
int32_t
srs_est
[
frame_parms
->
ofdm_symbol_size
*
(
1
<<
srs_pdu
->
num_symbols
)
+
mem_offset
+
8
]
__attribute__
((
aligned
(
32
)));
for
(
int
ant
=
0
;
ant
<
frame_parms
->
nb_antennas_rx
;
ant
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment