Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormpimenov <mpimenov@users.noreply.github.com>2016-12-12 17:47:07 +0300
committerGitHub <noreply@github.com>2016-12-12 17:47:07 +0300
commit81cc2edf02b699d4d9ac29e012ab0b85c2a41c2a (patch)
tree5e0df0ad2f86ce9e5fa5371c1ecf94d23d609098
parent4cddc4cc4800cc2ad2eb6fbaa0eb311cc644a0bd (diff)
parent775af118c332735338e21479f520afa475d9bf43 (diff)
Merge pull request #4962 from ygorshenin/fix-ub-in-search-testspy-modules-0.1.2beta-523
[search] Fixed UB in search_tests.
-rw-r--r--search/search_tests/string_intersection_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/search/search_tests/string_intersection_test.cpp b/search/search_tests/string_intersection_test.cpp
index 0443a0b335..12c4497c15 100644
--- a/search/search_tests/string_intersection_test.cpp
+++ b/search/search_tests/string_intersection_test.cpp
@@ -30,7 +30,11 @@ struct TestData
va_list ap;
va_start(ap, resCount);
for(int i = 0; i < resCount; i++)
- AddResult(va_arg(ap, int), va_arg(ap, int));
+ {
+ uint16_t const pos = va_arg(ap, int);
+ uint16_t const len = va_arg(ap, int);
+ AddResult(pos, len);
+ }
va_end(ap);
}