File texinfo-4.8-echo.patch of Package texinfo4
Index: info/echo-area.c
===================================================================
--- info/echo-area.c.orig 2008-06-12 14:39:20.000000000 +0200
+++ info/echo-area.c 2015-07-17 23:17:03.335060608 +0200
@@ -1503,7 +1503,7 @@ pause_or_input (void)
void
inform_in_echo_area (const char *message)
{
- int i;
+ int i, len;
char *text;
int avail = EA_MAX_INPUT + 1 - input_line_end;
@@ -1513,7 +1513,13 @@ inform_in_echo_area (const char *message
text[i] = 0;
echo_area_initialize_node ();
- sprintf (&input_line[input_line_end], "%s[%s]\n",
+
+ len = EA_MAX_INPUT - input_line_end;
+ if (len <= 0) {
+ free (text);
+ return;
+ }
+ snprintf (&input_line[input_line_end], len, "%s[%s]\n",
echo_area_is_active ? " ": "", text);
free (text);
the_echo_area->point = input_line_point;