logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git
commit: f6cf0813154a1022baea04eb06908df59ae0b802
parent 103b70baafabfba2e358684ed67875240b3486cf
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 17 Sep 2022 07:27:57 +0200

patches/sys-libs/musl/musl-1.1.3_gets_GTFO.patch

Diffstat:

Apatches/sys-libs/musl/musl-1.1.3_gets_GTFO.patch34++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+), 0 deletions(-)

diff --git a/patches/sys-libs/musl/musl-1.1.3_gets_GTFO.patch b/patches/sys-libs/musl/musl-1.1.3_gets_GTFO.patch @@ -0,0 +1,34 @@ +diff --git a/src/stdio/gets.c b/src/stdio/gets.c +--- a/src/stdio/gets.c ++++ b/src/stdio/gets.c +@@ -1,15 +1,6 @@ +-#include "stdio_impl.h" +-#include <limits.h> +-#include <string.h> ++#include <stdlib.h> + + char *gets(char *s) + { +- size_t i=0; +- int c; +- FLOCK(stdin); +- while ((c=getc_unlocked(stdin)) != EOF && c != '\n') s[i++] = c; +- s[i] = 0; +- if (c != '\n' && (!feof(stdin) || !i)) s = 0; +- FUNLOCK(stdin); +- return s; ++ abort(); + } +diff --git a/include/stdio.h b/include/stdio.h +--- a/include/stdio.h ++++ b/include/stdio.h +@@ -99,9 +99,6 @@ int putc(int, FILE *); + int putchar(int); + + char *fgets(char *__restrict, int, FILE *__restrict); +-#if __STDC_VERSION__ < 201112L +-char *gets(char *); +-#endif + + int fputs(const char *__restrict, FILE *__restrict); + int puts(const char *);