diff options
Diffstat (limited to 'app-editors/nano/files')
-rw-r--r-- | app-editors/nano/files/nano-3.1-enable_tiny_build_fix.patch | 29 | ||||
-rw-r--r-- | app-editors/nano/files/nano-4.0-variable_initialization.patch | 39 |
2 files changed, 39 insertions, 29 deletions
diff --git a/app-editors/nano/files/nano-3.1-enable_tiny_build_fix.patch b/app-editors/nano/files/nano-3.1-enable_tiny_build_fix.patch deleted file mode 100644 index 58fe1982be9c..000000000000 --- a/app-editors/nano/files/nano-3.1-enable_tiny_build_fix.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 368ec04870a366b19f1c5801a6868786547968b0 Mon Sep 17 00:00:00 2001 -From: Benno Schulenberg <bensberg@telfort.nl> -Date: Wed, 19 Sep 2018 20:36:39 +0200 -Subject: build: fix compilation again when configured with --enable-tiny - -Reported-by: Jordi Mallach <jordi@mallach.net> ---- - src/nano.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/nano.c b/src/nano.c -index ebb1f11..01f92a1 100644 ---- a/src/nano.c -+++ b/src/nano.c -@@ -1756,7 +1756,10 @@ int do_input(bool allow_funcs) - if (shortcut == NULL) - pletion_line = NULL; - else { -- if (ISSET(VIEW_MODE) && shortcut->func != do_toggle_void && -+ if (ISSET(VIEW_MODE) && -+#ifndef NANO_TINY -+ shortcut->func != do_toggle_void && -+#endif - !okay_for_view(shortcut)) { - print_view_warning(); - return ERR; --- -cgit v1.0-41-gc330 - diff --git a/app-editors/nano/files/nano-4.0-variable_initialization.patch b/app-editors/nano/files/nano-4.0-variable_initialization.patch new file mode 100644 index 000000000000..c72122ed7035 --- /dev/null +++ b/app-editors/nano/files/nano-4.0-variable_initialization.patch @@ -0,0 +1,39 @@ +From 7ad232d71470cd8c4dc63aeb02f11c9e8df9ecdb Mon Sep 17 00:00:00 2001 +From: Devin Hussey <husseydevin@gmail.com> +Date: Thu, 28 Mar 2019 17:28:47 -0400 +Subject: [PATCH] files: initialize a variable before referencing it + +The lack of initialization caused a nasty bug on some targets (such as +ARMv7) which would make it so that ^S would just say "Cancelled". + +While x86 (both 64 and 32 bits) seems to initialize 'response' to zero or +a positive number, ARM does not, and there is usually a negative value in +its place, which triggers the 'if (response < 0)' check and, as a result, +the code says "Cancelled". + +This fixes https://savannah.gnu.org/bugs/?56023. +Reported-by: Devin Hussey <husseydevin@gmail.com> + +Bug existed since version 4.0, commit 0f9d60a3. + +Signed-off-by: Devin Hussey <husseydevin@gmail.com> +--- + src/files.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/files.c b/src/files.c +index 84e3f684..fd54c168 100644 +--- a/src/files.c ++++ b/src/files.c +@@ -2101,7 +2101,7 @@ int do_writeout(bool exiting, bool withprompt) + + while (TRUE) { + const char *msg; +- int response, choice; ++ int response = 0, choice = 0; + functionptrtype func; + #ifndef NANO_TINY + const char *formatstr, *backupstr; +-- +2.20.1 + |