From 395c8e9e256b5d1308d6fbe98676523fb5934ee4 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <bensberg@justemail.net>
Date: Sun, 30 Apr 2017 12:49:30 +0200
Subject: [PATCH] help: allocate enough space for the descriptions, so we don't
 crash

We should measure the length of each /translated/ shortcut description,
not of the original English one.

This fixes https://savannah.gnu.org/bugs/?50899.
---
 src/help.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/help.c b/src/help.c
index d03560b3..f7d52f05 100644
--- a/src/help.c
+++ b/src/help.c
@@ -470,7 +470,7 @@ void help_init(void)
      * plus one or two \n's. */
     for (f = allfuncs; f != NULL; f = f->next)
 	if (f->menus & currmenu)
-	    allocsize += (16 * MAXCHARLEN) + strlen(f->help) + 2;
+	    allocsize += (16 * MAXCHARLEN) + strlen(_(f->help)) + 2;
 
 #ifndef NANO_TINY
     /* If we're on the main list, we also count the toggle help text.
-- 
GitLab