Control: tags 925753 + patch
Control: tags 925753 + pending

Dear maintainer,

I've prepared an NMU for libneo4j-client (versioned as 2.2.0-1.1) and
uploaded it to mentors for sponsoring. Please feel free to tell me if I
should remove it.

--
Regards
Sudip

diff -Nru libneo4j-client-2.2.0/debian/changelog 
libneo4j-client-2.2.0/debian/changelog
--- libneo4j-client-2.2.0/debian/changelog      2017-09-20 08:30:52.000000000 
+0100
+++ libneo4j-client-2.2.0/debian/changelog      2020-03-13 23:36:49.000000000 
+0000
@@ -1,3 +1,10 @@
+libneo4j-client (2.2.0-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix ftbfs with gcc-9. (Closes: #925753)
+
+ -- Sudip Mukherjee <sudipm.mukher...@gmail.com>  Fri, 13 Mar 2020 23:36:49 
+0000
+
 libneo4j-client (2.2.0-1) unstable; urgency=medium
 
   * New upstream release 2.2.0
diff -Nru libneo4j-client-2.2.0/debian/patches/fix_null.patch 
libneo4j-client-2.2.0/debian/patches/fix_null.patch
--- libneo4j-client-2.2.0/debian/patches/fix_null.patch 1970-01-01 
01:00:00.000000000 +0100
+++ libneo4j-client-2.2.0/debian/patches/fix_null.patch 2020-03-13 
23:36:49.000000000 +0000
@@ -0,0 +1,23 @@
+Description: Fix null-termination warnings from gcc8
+
+upstream - 
https://github.com/cleishm/libneo4j-client/commit/960bf2eb620370bd35534ea28b977c748d45aea3
 
+Bug-Debian: https://bugs.debian.org/925753
+
+---
+
+--- libneo4j-client-2.2.0.orig/src/lib/client_config.c
++++ libneo4j-client-2.2.0/src/lib/client_config.c
+@@ -492,9 +492,11 @@ int ensure_basic_auth_credentials(neo4j_
+     char username_buf[NEO4J_MAXUSERNAMELEN + 1];
+     char password_buf[NEO4J_MAXPASSWORDLEN + 1];
+     strncpy(username_buf, (config->username != NULL)? config->username : "",
+-            sizeof(username_buf));
++            sizeof(username_buf) - 1);
++    username_buf[sizeof(username_buf) - 1] = '\0';
+     strncpy(password_buf, (config->password != NULL)? config->password : "",
+-            sizeof(password_buf));
++            sizeof(password_buf) - 1);
++    password_buf[sizeof(password_buf) - 1] = '\0';
+ 
+     int err = -1;
+ 
diff -Nru libneo4j-client-2.2.0/debian/patches/series 
libneo4j-client-2.2.0/debian/patches/series
--- libneo4j-client-2.2.0/debian/patches/series 1970-01-01 01:00:00.000000000 
+0100
+++ libneo4j-client-2.2.0/debian/patches/series 2020-03-13 23:36:49.000000000 
+0000
@@ -0,0 +1,2 @@
+fix_null.patch
+use_memcpy.patch
diff -Nru libneo4j-client-2.2.0/debian/patches/use_memcpy.patch 
libneo4j-client-2.2.0/debian/patches/use_memcpy.patch
--- libneo4j-client-2.2.0/debian/patches/use_memcpy.patch       1970-01-01 
01:00:00.000000000 +0100
+++ libneo4j-client-2.2.0/debian/patches/use_memcpy.patch       2020-03-13 
23:36:49.000000000 +0000
@@ -0,0 +1,17 @@
+Description: Use memcpy over strncpy
+
+upstream: 
https://github.com/cleishm/libneo4j-client/commit/03bdc0ae23a48da1745f6cb08bde3ebb4b8c6588
+
+---
+
+--- libneo4j-client-2.2.0.orig/src/lib/print.c
++++ libneo4j-client-2.2.0/src/lib/print.c
+@@ -49,7 +49,7 @@ size_t neo4j_null_str(const neo4j_value_
+         {
+             n = 5;
+         }
+-        strncpy(buf, "null", n);
++        memcpy(buf, "null", n-1);
+         buf[n-1] = '\0';
+     }
+     return 4;

Reply via email to