INN commit: trunk/frontends (inews.c)

INN Commit rra at isc.org
Sun May 10 12:56:12 UTC 2020


    Date: Sunday, May 10, 2020 @ 05:56:11
  Author: iulius
Revision: 10362

Fix build with GCC 10.1

Ensure that ser_line is at least 4-byte long.
And that there is enough room in buff to copy the path.

Modified:
  trunk/frontends/inews.c

---------+
 inews.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Modified: inews.c
===================================================================
--- inews.c	2020-05-10 12:48:53 UTC (rev 10361)
+++ inews.c	2020-05-10 12:56:11 UTC (rev 10362)
@@ -687,7 +687,7 @@
     *linesp = 0;
     if (strlen(homedir) > sizeof(buff) - 14)
         die("home directory path too long");
-    sprintf(buff, "%s/.signature", homedir);
+    snprintf(buff, sizeof(buff), "%s/.signature", homedir);
     if ((F = fopen(buff, "r")) == NULL) {
 	if (errno == ENOENT)
 	    return article;



More information about the inn-committers mailing list