projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
19c058d
)
smoother-test: Fix array overflow.
author
Tanu Kaskinen
<tanu.kaskinen@digia.com>
Fri, 30 Mar 2012 07:31:48 +0000
(10:31 +0300)
committer
Tanu Kaskinen
<tanuk@iki.fi>
Wed, 19 Dec 2012 10:31:50 +0000
(12:31 +0200)
src/tests/smoother-test.c
patch
|
blob
|
history
diff --git
a/src/tests/smoother-test.c
b/src/tests/smoother-test.c
index c06f96d9afcbb754b004edcf392ea0e9bf37736b..eac824e80ecfe0618bc39ead49450d35638b6829 100644
(file)
--- a/
src/tests/smoother-test.c
+++ b/
src/tests/smoother-test.c
@@
-75,7
+75,8
@@
START_TEST (smoother_test) {
pa_log_debug("%i\t\t%i", msec[u], msec[u+1]);
u += 2;
- pa_smoother_resume(s, (pa_usec_t) msec[u] * PA_USEC_PER_MSEC, TRUE);
+ if (u < PA_ELEMENTSOF(msec))
+ pa_smoother_resume(s, (pa_usec_t) msec[u] * PA_USEC_PER_MSEC, TRUE);
}
pa_log_debug("%llu\t%llu", (unsigned long long) (x/PA_USEC_PER_MSEC), (unsigned long long) (pa_smoother_get(s, x)/PA_USEC_PER_MSEC));