From 8ba7c45e0b6165fd0b3df72abf94bea459fcef85 Mon Sep 17 00:00:00 2001 From: Tianjie Xu Date: Tue, 12 Sep 2017 11:13:02 -0700 Subject: Fix the dangling pointer when setting up arguments of imgdiff Test: unit tests pass Change-Id: If884e805ccd4df73671ab3436eb90860786ff6c9 --- tests/component/imgdiff_test.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tests/component/imgdiff_test.cpp b/tests/component/imgdiff_test.cpp index 3163a57cf..73516050b 100644 --- a/tests/component/imgdiff_test.cpp +++ b/tests/component/imgdiff_test.cpp @@ -779,9 +779,10 @@ TEST(ImgdiffTest, zip_mode_store_large_apk) { // Compute patch. TemporaryFile patch_file; TemporaryDir debug_dir; + std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); std::vector args = { - "imgdiff", "-z", "--block-limit=10", android::base::StringPrintf( - "--debug-dir=%s", debug_dir.path).c_str(), src_file.path, tgt_file.path, patch_file.path, + "imgdiff", "-z", "--block-limit=10", debug_dir_arg.c_str(), src_file.path, tgt_file.path, + patch_file.path, }; ASSERT_EQ(0, imgdiff(args.size(), args.data())); @@ -901,9 +902,10 @@ TEST(ImgdiffTest, zip_mode_no_match_source) { // Compute patch. TemporaryFile patch_file; TemporaryDir debug_dir; + std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); std::vector args = { - "imgdiff", "-z", "--block-limit=10", android::base::StringPrintf( - "--debug-dir=%s", debug_dir.path).c_str(), src_file.path, tgt_file.path, patch_file.path, + "imgdiff", "-z", "--block-limit=10", debug_dir_arg.c_str(), src_file.path, tgt_file.path, + patch_file.path, }; ASSERT_EQ(0, imgdiff(args.size(), args.data())); @@ -940,9 +942,10 @@ TEST(ImgdiffTest, zip_mode_large_enough_limit) { // Compute patch with a limit of 20 blocks. TemporaryFile patch_file; TemporaryDir debug_dir; + std::string debug_dir_arg = android::base::StringPrintf("--debug-dir=%s", debug_dir.path); std::vector args = { - "imgdiff", "-z", "--block-limit=20", android::base::StringPrintf( - "--debug-dir=%s", debug_dir.path).c_str(), src_file.path, tgt_file.path, patch_file.path, + "imgdiff", "-z", "--block-limit=20", debug_dir_arg.c_str(), src_file.path, tgt_file.path, + patch_file.path, }; ASSERT_EQ(0, imgdiff(args.size(), args.data())); -- cgit v1.2.3 From c9b04168426f55d74a3de0bdb851307ea511a315 Mon Sep 17 00:00:00 2001 From: Bill Yi Date: Sat, 16 Sep 2017 05:39:19 -0700 Subject: Import translations. DO NOT MERGE Auto-generated-cl: translation import Exempt-From-Owner-Approval: translation import Bug: 64712476 Change-Id: Ia05d14ff5b7f6b283f46566c88a4edc4a89d5576 --- tools/recovery_l10n/res/values-pa/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/recovery_l10n/res/values-pa/strings.xml b/tools/recovery_l10n/res/values-pa/strings.xml index 8564c9c36..27972d117 100644 --- a/tools/recovery_l10n/res/values-pa/strings.xml +++ b/tools/recovery_l10n/res/values-pa/strings.xml @@ -1,9 +1,9 @@ - "ਸਿਸਟਮ ਅੱਪਡੇਟ ਸਥਾਪਤ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ" + "ਸਿਸਟਮ ਅੱਪਡੇਟ ਸਥਾਪਤ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" "ਮਿਟਾਈ ਜਾ ਰਹੀ ਹੈ" - "ਕੋਈ ਕਮਾਂਡ ਨਹੀਂ" + "ਕੋਈ ਆਦੇਸ਼ ਨਹੀਂ" "ਅਸ਼ੁੱਧੀ!" - "ਸੁਰੱਖਿਆ ਅੱਪਡੇਟ ਸਥਾਪਤ ਕੀਤੀ ਜਾ ਰਹੀ ਹੈ" + "ਸੁਰੱਖਿਆ ਅੱਪਡੇਟ ਸਥਾਪਤ ਕੀਤਾ ਜਾ ਰਿਹਾ ਹੈ" -- cgit v1.2.3