← Commit list

e9455ea523

Daniel Stenberg
Daniel Stenberg
2025-10-17
SUCCESS Duration: 313s

Subject

rustls: make read_file_into not reject good files

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

lib/vtls/rustls.c+2 -2
@@ -404,8 +404,8 @@ read_file_into(const char *filename,
for(;;) {
uint8_t buf[256];
const size_t rr = fread(buf, 1, sizeof(buf), f);
- if(rr == 0 ||
- CURLE_OK != curlx_dyn_addn(out, buf, rr)) {
+ if((!rr && !feof(f)) ||
+ curlx_dyn_addn(out, buf, rr)) {
curlx_fclose(f);
return 0;
}