Android-x86
Fork
捐款

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-vold: 提交

system/vold


Commit MetaInfo

修訂7f6172bd1b4e0a189691822825b0876893917bb8 (tree)
時間2019-10-16 23:36:58
作者Chih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Android 7.1.2 Release 39 (5787804)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCXZfNxwAKCRDorT+BmrEO
eP2lAJ9Qxhzu+oe/EaWpCJnk9G/LVCa9YwCeK6/wOJdBMh/2FAd33qV3YGcQ4Yk=
=HvjB
-----END PGP SIGNATURE-----

Merge tag 'android-7.1.2_r39' into nougat-x86

Android 7.1.2 Release 39 (5787804)

Change Summary

差異

--- a/Utils.cpp
+++ b/Utils.cpp
@@ -237,17 +237,17 @@ static status_t readMetadata(const std::string& path, std::string& fsType,
237237 for (auto line : output) {
238238 // Extract values from blkid output, if defined
239239 const char* cline = line.c_str();
240- char* start = strstr(cline, "TYPE=");
240+ char* start = strstr(cline, "TYPE=\"");
241241 if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
242242 fsType = value;
243243 }
244244
245- start = strstr(cline, "UUID=");
245+ start = strstr(cline, "UUID=\"");
246246 if (start != nullptr && sscanf(start + 5, "\"%127[^\"]\"", value) == 1) {
247247 fsUuid = value;
248248 }
249249
250- start = strstr(cline, "LABEL=");
250+ start = strstr(cline, "LABEL=\"");
251251 if (start != nullptr && sscanf(start + 6, "\"%127[^\"]\"", value) == 1) {
252252 fsLabel = value;
253253 }
--- a/cryptfs.c
+++ b/cryptfs.c
@@ -3814,24 +3814,25 @@ int cryptfs_changepw_hw_fde(int crypt_type, const char *currentpw, const char *n
38143814 static unsigned int persist_get_max_entries(int encrypted) {
38153815 struct crypt_mnt_ftr crypt_ftr;
38163816 unsigned int dsize;
3817- unsigned int max_persistent_entries;
38183817
38193818 /* If encrypted, use the values from the crypt_ftr, otherwise
38203819 * use the values for the current spec.
38213820 */
38223821 if (encrypted) {
38233822 if (get_crypt_ftr_and_key(&crypt_ftr)) {
3824- return -1;
3823+ /* Something is wrong, assume no space for entries */
3824+ return 0;
38253825 }
38263826 dsize = crypt_ftr.persist_data_size;
38273827 } else {
38283828 dsize = CRYPT_PERSIST_DATA_SIZE;
38293829 }
38303830
3831- max_persistent_entries = (dsize - sizeof(struct crypt_persist_data)) /
3832- sizeof(struct crypt_persist_entry);
3833-
3834- return max_persistent_entries;
3831+ if (dsize > sizeof(struct crypt_persist_data)) {
3832+ return (dsize - sizeof(struct crypt_persist_data)) / sizeof(struct crypt_persist_entry);
3833+ } else {
3834+ return 0;
3835+ }
38353836 }
38363837
38373838 static int persist_get_key(const char *fieldname, char *value)
Show on old repository browser