diff options
author | tnn <tnn@pkgsrc.org> | 2020-08-18 01:46:06 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2020-08-18 01:46:06 +0000 |
commit | f4fdced1047ed7678706fdcd2b7e845f0f150365 (patch) | |
tree | 05077c65b7ef558e7679ea9bbe0e7d7d64de51ce /comms | |
parent | dad0851ff292ca5c153fa059ce045cd73b31656e (diff) | |
download | pkgsrc-f4fdced1047ed7678706fdcd2b7e845f0f150365.tar.gz |
synce-libsynce: fix build
Diffstat (limited to 'comms')
-rw-r--r-- | comms/synce-libsynce/distinfo | 3 | ||||
-rw-r--r-- | comms/synce-libsynce/patches/patch-lib_files.c | 20 |
2 files changed, 22 insertions, 1 deletions
diff --git a/comms/synce-libsynce/distinfo b/comms/synce-libsynce/distinfo index d1c2d102271..5f0c3a6936f 100644 --- a/comms/synce-libsynce/distinfo +++ b/comms/synce-libsynce/distinfo @@ -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 @@ SHA512 (synce-libsynce-0.9.1.tar.gz) = 5ef1b77b06d6afc97e9918728d4fdeb9069650e43 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 --git a/comms/synce-libsynce/patches/patch-lib_files.c b/comms/synce-libsynce/patches/patch-lib_files.c new file mode 100644 index 00000000000..265b14c0940 --- /dev/null +++ b/comms/synce-libsynce/patches/patch-lib_files.c @@ -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; |