MTP: Sanitize filename provided from MTP host
Fix potential security vulnerability via MTP path traversal
Bug: 130656917
Test: atest frameworks/av/mtp/ffs/tests
Test: Manual test: modified libmtp for path traversal attack
Test: Manual test: normal recursive folder copy
Signed-off-by: sekaiacg <sekaiacg@gmail.com>
Change-Id: I118d180a98378c8fecd9fd6f37de7d5983426695
(cherry picked from commit 13b2978e022d81a6c0519a54743876b0481da401)
diff --git a/mtp/ffs/Android.mk b/mtp/ffs/Android.mk
index 0f8bda9..90f9d32 100755
--- a/mtp/ffs/Android.mk
+++ b/mtp/ffs/Android.mk
@@ -59,7 +59,8 @@
libcutils \
libutils \
libselinux \
- libbase
+ libbase \
+ liblog
LOCAL_C_INCLUDES += bootable/recovery/twrplibusbhost/include