aboutsummaryrefslogtreecommitdiffstats
path: root/main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch')
-rw-r--r--main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch37
1 files changed, 0 insertions, 37 deletions
diff --git a/main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch b/main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
deleted file mode 100644
index a5d4e4af63..0000000000
--- a/main/musl/0002-fix-unlikely-corner-cases-in-getopt-s-message-printi.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ef2b5e9f13a7f216d6d64aeccc6b33c1262faece Mon Sep 17 00:00:00 2001
-From: Rich Felker <dalias@aerifal.cx>
-Date: Tue, 16 Feb 2016 13:27:24 -0500
-Subject: [PATCH] fix unlikely corner cases in getopt's message printing
-
-like fputs (see commit 10a17dfbad2c267d885817abc9c7589fc7ff630b), the
-message printing code for getopt assumed that fwrite only returns 0 on
-failure, but it can also happen on success if the total length to be
-written is zero. programs with zero-length argv[0] were affected.
-
-commit 500c6886c654fd45e4926990fee2c61d816be197 introduced this
-problem in getopt by fixing the fwrite behavior to conform to the
-requirements of ISO C. previously the wrong expectations of the getopt
-code were met by the fwrite implementation.
----
- src/misc/getopt.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/src/misc/getopt.c b/src/misc/getopt.c
-index 9217983..8290aef 100644
---- a/src/misc/getopt.c
-+++ b/src/misc/getopt.c
-@@ -17,9 +17,9 @@ void __getopt_msg(const char *a, const char *b, const char *c, size_t l)
- FILE *f = stderr;
- b = __lctrans_cur(b);
- flockfile(f);
-- fwrite(a, strlen(a), 1, f)
-+ fputs(a, f)>=0
- && fwrite(b, strlen(b), 1, f)
-- && fwrite(c, l, 1, f)
-+ && fwrite(c, 1, l, f)==l
- && putc('\n', f);
- funlockfile(f);
- }
---
-2.7.1
-