diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-10-19 09:49:59 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2022-10-19 10:10:57 +0200 |
commit | f3bd4b3df598ce5ea3137b13054ba7cc00714640 (patch) | |
tree | 5451b3261c621da8a909d30a1eb38b7cad0dc5e7 /src/fuzz/fuzz.h | |
parent | dc1768131a94d0e123c2e692215628ebce0b01fa (diff) | |
download | systemd-f3bd4b3df598ce5ea3137b13054ba7cc00714640.tar.gz |
tree-wide: do not use "re" with fmemopen
The man page says nothing about "e". Glibc clearly accepts it without fuss, but
it is meaningless for a memory object (and probably doesn't work). This use is
not portable, so let's avoid it.
Diffstat (limited to 'src/fuzz/fuzz.h')
-rw-r--r-- | src/fuzz/fuzz.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/fuzz/fuzz.h b/src/fuzz/fuzz.h index a7d3a89fe2..77e0ad98dc 100644 --- a/src/fuzz/fuzz.h +++ b/src/fuzz/fuzz.h @@ -14,7 +14,7 @@ static inline FILE* data_to_file(const uint8_t *data, size_t size) { if (size == 0) return fopen("/dev/null", "re"); else - return fmemopen_unlocked((char*) data, size, "re"); + return fmemopen_unlocked((char*) data, size, "r"); } /* Check if we are within the specified size range. |