Fix Android directory CRC login crash and record Mi 8 Lite device tests
This commit is contained in:
@@ -111,6 +111,13 @@ int main()
|
||||
check(GetHFILECRC32(fp) == 0xCBF43926u && ftell(fp) == 4, "GetHFILECRC32 whole file, position kept");
|
||||
fclose(fp);
|
||||
check(GetFileCRC32("/nonexistent/mt_crc32") == 0 && GetFileSize("/nonexistent/mt_crc32") == 0, "CRC32 missing file");
|
||||
check(GetFileCRC32("/tmp") == 0, "CRC32 directory rejected without allocation");
|
||||
fp = fopen("/tmp", "rb");
|
||||
if (fp) {
|
||||
check(GetHFILECRC32(fp) == 0, "CRC32 directory handle rejected");
|
||||
fclose(fp);
|
||||
}
|
||||
check(GetHFILECRC32(nullptr) == 0, "CRC32 null handle rejected");
|
||||
remove(path);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user