diff options
author | paulhsia <paulhsia@chromium.org> | 2019-12-10 08:43:56 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-10 19:30:11 +0000 |
commit | 5b9f8f2862b88a04da387e15229a0acd03f0805a (patch) | |
tree | 9521a22c302a3ab4492c1a1e2df899583356e342 /cras/src/common/cras_config.h | |
parent | 645ad21dee6be08fe9ead50e1ce8db4b60724384 (diff) | |
download | adhd-5b9f8f2862b88a04da387e15229a0acd03f0805a.tar.gz |
CRAS: cras_rstream: Set max buffer_size to 10 secs
Invalid client stream configuration can cause server out-of-memory.
Set 10 secs limits to input buffer_size.
oss-fuzz: 19306
BUG=chromium:1032356
TEST=Build and unit tests
Change-Id: I9358fcf838645feb4a0fe65d2e6ff32ff9106425
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/1958348
Tested-by: Chih-Yang Hsia <paulhsia@chromium.org>
Auto-Submit: Chih-Yang Hsia <paulhsia@chromium.org>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Reviewed-by: Cheng-Yi Chiang <cychiang@chromium.org>
Commit-Queue: Chih-Yang Hsia <paulhsia@chromium.org>
Diffstat (limited to 'cras/src/common/cras_config.h')
-rw-r--r-- | cras/src/common/cras_config.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cras/src/common/cras_config.h b/cras/src/common/cras_config.h index 8b1e6135..08d083e3 100644 --- a/cras/src/common/cras_config.h +++ b/cras/src/common/cras_config.h @@ -9,6 +9,7 @@ #include "cras_types.h" #define CRAS_MIN_BUFFER_TIME_IN_US 1000 /* 1 milliseconds */ +#define CRAS_MAX_BUFFER_TIME_IN_S 10 /* 10 seconds */ #define CRAS_SERVER_RT_THREAD_PRIORITY 12 #define CRAS_CLIENT_RT_THREAD_PRIORITY 10 |