0.3.0: converge relibc to upstream 0.6.0 + Red Bear patches

This commit is contained in:
2026-07-06 19:13:08 +03:00
parent 1a0edd8eeb
commit 4ef7e57571
1466 changed files with 75236 additions and 13644 deletions
+9 -3
View File
@@ -10,9 +10,15 @@ int main(void) {
char buf[33] = { 0 };
for (int i = 1; i <= 32; ++i) {
if (fread(buf, 1, i, fp) < 0) {
perror("fread");
exit(EXIT_FAILURE);
size_t nread = fread(buf, 1, i, fp);
if (nread == 0) {
if (feof(fp)) {
fprintf(stderr, "early EOF\n");
return EXIT_FAILURE;
} else {
perror("fread");
return EXIT_FAILURE;
}
}
buf[i] = 0;