projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
allow fmemopen with zero size
[musl]
/
src
/
stdio
/
fmemopen.c
diff --git
a/src/stdio/fmemopen.c
b/src/stdio/fmemopen.c
index
82413b2
..
5685092
100644
(file)
--- a/
src/stdio/fmemopen.c
+++ b/
src/stdio/fmemopen.c
@@
-83,7
+83,7
@@
FILE *fmemopen(void *restrict buf, size_t size, const char *restrict mode)
struct mem_FILE *f;
int plus = !!strchr(mode, '+');
struct mem_FILE *f;
int plus = !!strchr(mode, '+');
- if (!s
ize || !s
trchr("rwa", *mode)) {
+ if (!strchr("rwa", *mode)) {
errno = EINVAL;
return 0;
}
errno = EINVAL;
return 0;
}