summaryrefslogtreecommitdiff
path: root/src/fuzz
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-10-19 09:49:59 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2022-10-19 10:10:57 +0200
commitf3bd4b3df598ce5ea3137b13054ba7cc00714640 (patch)
tree5451b3261c621da8a909d30a1eb38b7cad0dc5e7 /src/fuzz
parentdc1768131a94d0e123c2e692215628ebce0b01fa (diff)
downloadsystemd-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')
-rw-r--r--src/fuzz/fuzz.h2
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.