Merge 9f80b23edba1eb6dc40b63adb35b30c1b7a0e325 into 03e1438089654fb884ac48e0f3cd0049cfe2c102

This commit is contained in:
Mingjie Shen 2026-10-27 10:46:09 -04:00 committed by GitHub
commit ac90bcf042
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -179,12 +179,12 @@ void pkcs7_verify(char *pkcs7_file,
TEST_EQUAL(res, 0);
}
res = stat(filetobesigned, &st);
TEST_EQUAL(res, 0);
file = fopen(filetobesigned, "rb");
TEST_ASSERT(file != NULL);
res = fstat(fileno(file), &st);
TEST_EQUAL(res, 0);
datalen = st.st_size;
/* Special-case for zero-length input so that data will be non-NULL */
TEST_CALLOC(data, datalen == 0 ? 1 : datalen);