pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/fstrm Fix format / buffer size warnings with newer...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/880534062ec3
branches:  trunk
changeset: 406222:880534062ec3
user:      he <he%pkgsrc.org@localhost>
date:      Mon Dec 16 12:52:23 2019 +0000

description:
Fix format / buffer size warnings with newer gcc (7.4.0) by
also leaving room for the terminating 0 character.
Also submitted as https://github.com/farsightsec/fstrm/pull/63
Bump PKGREVISION.

diffstat:

 net/fstrm/Makefile                   |   3 ++-
 net/fstrm/patches/patch-libmy_argv.c |  24 ++++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletions(-)

diffs (40 lines):

diff -r 73435de0ff9b -r 880534062ec3 net/fstrm/Makefile
--- a/net/fstrm/Makefile        Mon Dec 16 12:30:56 2019 +0000
+++ b/net/fstrm/Makefile        Mon Dec 16 12:52:23 2019 +0000
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.5 2019/10/14 17:47:24 he Exp $
+# $NetBSD: Makefile,v 1.6 2019/12/16 12:52:23 he Exp $
 
 DISTNAME=      fstrm-0.6.0
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_GITHUB:=farsightsec/}
 GITHUB_TAG=    v${PKGVERSION_NOREV}
diff -r 73435de0ff9b -r 880534062ec3 net/fstrm/patches/patch-libmy_argv.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/fstrm/patches/patch-libmy_argv.c      Mon Dec 16 12:52:23 2019 +0000
@@ -0,0 +1,24 @@
+$NetBSD: patch-libmy_argv.c,v 1.1 2019/12/16 12:52:23 he Exp $
+
+Include space for the terminating 0 character.
+
+--- libmy/argv.c.orig  2019-10-14 16:25:11.000000000 +0000
++++ libmy/argv.c
+@@ -482,7 +482,7 @@ static     int     expand_buf(const void *buf, c
+       if (out_p + 2 >= max_p) {
+       break;
+       }
+-      LOC_SNPRINTF(SNP_ARG(out_p, 2), "\\%c", *(spec_p - 1));
++      LOC_SNPRINTF(SNP_ARG(out_p, 3), "\\%c", *(spec_p - 1));
+       out_p += 2;
+       continue;
+     }
+@@ -499,7 +499,7 @@ static     int     expand_buf(const void *buf, c
+       if (out_p + 4 >= max_p) {
+       break;
+       }
+-      LOC_SNPRINTF(SNP_ARG(out_p, 4), "\\%03o", *buf_p);
++      LOC_SNPRINTF(SNP_ARG(out_p, 5), "\\%03o", *buf_p);
+       out_p += 4;
+     }
+   }



Home | Main Index | Thread Index | Old Index