projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
65c7236
)
Original Commit: r69 | ods15 | 2006-09-27 20:27:50 +0300 (Wed, 27 Sep 2006) | 2 lines
author
Oded Shimon
<ods15@ods15.dyndns.org>
Mon, 2 Oct 2006 06:08:07 +0000
(06:08 +0000)
committer
Oded Shimon
<ods15@ods15.dyndns.org>
Mon, 2 Oct 2006 06:08:07 +0000
(06:08 +0000)
prevent buffer overflow
Originally committed as revision 6474 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavcodec/vorbis_enc.c
patch
|
blob
|
history
diff --git
a/libavcodec/vorbis_enc.c
b/libavcodec/vorbis_enc.c
index
538a07e
..
7a83324
100644
(file)
--- a/
libavcodec/vorbis_enc.c
+++ b/
libavcodec/vorbis_enc.c
@@
-661,7
+661,7
@@
static void floor_fit(venc_context_t * venc, floor_t * fc, float * coeffs, int *
for (j = begin; j < end; j++) average += fabs(coeffs[j]);
average /= end - begin;
average /= 32; // MAGIC!
- for (j = 0; j < range; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
+ for (j = 0; j < range
- 1
; j++) if (floor1_inverse_db_table[j * fc->multiplier] > average) break;
posts[fc->list[i].sort] = j;
}
}