Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/comms/synce-libsynce synce-libsynce: fix build



details:   https://anonhg.NetBSD.org/pkgsrc/rev/84a79ee62273
branches:  trunk
changeset: 437164:84a79ee62273
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Tue Aug 18 01:46:06 2020 +0000

description:
synce-libsynce: fix build

diffstat:

 comms/synce-libsynce/distinfo                  |   3 ++-
 comms/synce-libsynce/patches/patch-lib_files.c |  20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 1 deletions(-)

diffs (38 lines):

diff -r c9bc585b9c62 -r 84a79ee62273 comms/synce-libsynce/distinfo
--- a/comms/synce-libsynce/distinfo     Tue Aug 18 01:17:05 2020 +0000
+++ b/comms/synce-libsynce/distinfo     Tue Aug 18 01:46:06 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2015/11/03 01:34:57 agc Exp $
+$NetBSD: distinfo,v 1.3 2020/08/18 01:46:06 tnn Exp $
 
 SHA1 (synce-libsynce-0.9.1.tar.gz) = 603930b41fa987fa7e5e709a40360a616eac231c
 RMD160 (synce-libsynce-0.9.1.tar.gz) = a8c9d68196dec1b7555f56e8aab622a2817e1cf3
@@ -6,3 +6,4 @@
 Size (synce-libsynce-0.9.1.tar.gz) = 356343 bytes
 SHA1 (patch-aa) = bec59abf5b271c4f9a92af85a7cd3e3c19833d61
 SHA1 (patch-ab) = 0f36a9f97706e26ae49569dda0d21a42cfdb63ec
+SHA1 (patch-lib_files.c) = 4bc7d83e1ea3f83a103c7d5543c9cf3130e87aef
diff -r c9bc585b9c62 -r 84a79ee62273 comms/synce-libsynce/patches/patch-lib_files.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/comms/synce-libsynce/patches/patch-lib_files.c    Tue Aug 18 01:46:06 2020 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-lib_files.c,v 1.1 2020/08/18 01:46:07 tnn Exp $
+
+files.c:128:35: error: '__builtin_snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
+  snprintf(buffer, sizeof(buffer), "%s/%s" , path, connection_filename);
+                                   ^~~~~~~
+files.c:128:2: note: '__builtin_snprintf' output 2 or more bytes (assuming 257) into a destination of size 256
+  snprintf(buffer, sizeof(buffer), "%s/%s" , path, connection_filename);
+
+--- lib/files.c.orig   2005-05-16 21:42:34.000000000 +0000
++++ lib/files.c
+@@ -125,7 +125,8 @@ bool synce_get_connection_filename(char*
+       if (!synce_get_directory(&path))
+               goto exit;
+ 
+-      snprintf(buffer, sizeof(buffer), "%s/%s" , path, connection_filename);
++      if (snprintf(buffer, sizeof(buffer), "%s/%s" , path, connection_filename) > (int)sizeof(buffer) - 1)
++              goto exit;
+       *filename = strdup(buffer);
+ 
+       success = true;



Home | Main Index | Thread Index | Old Index