diff options
author | Ralph Giles <giles@mozilla.com> | 2016-07-04 10:39:31 -0700 |
---|---|---|
committer | Ralph Giles <giles@mozilla.com> | 2016-07-04 10:39:31 -0700 |
commit | c3563be66f16a5c84ba400eea4ee119ced0789fb (patch) | |
tree | e96aff0ef76642a8073545233b934b0d4cf08f15 /silk | |
parent | 9203565fa86ace78016fd01e5e19ad64adac1c6f (diff) | |
download | libopus-c3563be66f16a5c84ba400eea4ee119ced0789fb.tar.gz |
Assert non-overlapping memcpy. r=mark4o
Coverity warns about the possibly-overlappying memcpy in this
block, presumedly because it can't prove predictLPCOrder <= MAX_LPC_ORDER
here. Add an assert to make the intent clear in code as well
as in the comment.
Diffstat (limited to 'silk')
-rw-r--r-- | silk/process_NLSFs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/silk/process_NLSFs.c b/silk/process_NLSFs.c index c27cf030..248000bc 100644 --- a/silk/process_NLSFs.c +++ b/silk/process_NLSFs.c @@ -100,6 +100,7 @@ void silk_process_NLSFs( } else { /* Copy LPC coefficients for first half from second half */ + silk_assert( psEncC->predictLPCOrder <= MAX_LPC_ORDER ); silk_memcpy( PredCoef_Q12[ 0 ], PredCoef_Q12[ 1 ], psEncC->predictLPCOrder * sizeof( opus_int16 ) ); } } |