aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDorin Drimus <dorindrimus@google.com>2022-03-25 14:34:48 +0100
committerDorin Drimus <dorindrimus@google.com>2022-03-25 13:51:25 +0000
commit4e2e47709981ebf65ef83d960c3ac4ab450da038 (patch)
tree20dabe9caba8e311d91a2798f2faa0cbda34ef75
parent0c5a5155ba6da26c4e15acac9c182847add842e5 (diff)
downloadbt-4e2e47709981ebf65ef83d960c3ac4ab450da038.tar.gz
Increase limit for HID Device Descriptor in BT
Bug: 224715607 Test: N/A, presubmit (cherry-picked from commit 575f3a4c925021087ca42e0808c09b6d7317a43a) Merged-In: I236cac69a6099ef66b97aa7a87c323927a22a07a Change-Id: I91e4ca76b55d48023814d2f3976ee32ac0a0ed4d
-rw-r--r--osi/src/config.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/osi/src/config.cc b/osi/src/config.cc
index 29d620640..18176d0bd 100644
--- a/osi/src/config.cc
+++ b/osi/src/config.cc
@@ -493,8 +493,8 @@ static bool config_parse(FILE* fp, config_t* config) {
CHECK(config != nullptr);
int line_num = 0;
- char line[1024];
- char section[1024];
+ char line[4096];
+ char section[4096];
strcpy(section, CONFIG_DEFAULT_SECTION);
while (fgets(line, sizeof(line), fp)) {
@@ -511,7 +511,7 @@ static bool config_parse(FILE* fp, config_t* config) {
<< line_num;
return false;
}
- strncpy(section, line_ptr + 1, len - 2); // NOLINT (len < 1024)
+ strncpy(section, line_ptr + 1, len - 2); // NOLINT (len < 4096)
section[len - 2] = '\0';
} else {
char* split = strchr(line_ptr, '=');