projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix double-processing of DT_RELR relocations in ldso relocating itself
[musl]
/
src
/
stdio
/
fwrite.c
diff --git
a/src/stdio/fwrite.c
b/src/stdio/fwrite.c
index
fa30c0d
..
7a567b2
100644
(file)
--- a/
src/stdio/fwrite.c
+++ b/
src/stdio/fwrite.c
@@
-28,6
+28,7
@@
size_t __fwritex(const unsigned char *restrict s, size_t l, FILE *restrict f)
size_t fwrite(const void *restrict src, size_t size, size_t nmemb, FILE *restrict f)
{
size_t k, l = size*nmemb;
+ if (!size) nmemb = 0;
FLOCK(f);
k = __fwritex(src, l, f);
FUNLOCK(f);