Browse Source

Don't copy NULL

Christoph Biedl 7 years ago
parent
commit
d1d3f7add2

+ 16 - 0
debian/patches/cherry-pick.FILE5_28-9-g1222ebc.dont-copy-null-igor-gnatenko.patch

@@ -0,0 +1,16 @@
+Subject: Don't copy NULL (Igor Gnatenko)
+Origin: FILE5_28-9-g1222ebc
+Upstream-Author: Christos Zoulas <christos@zoulas.com>
+Date: Tue Jun 28 16:38:26 2016 +0000
+
+--- a/src/compress.c
++++ b/src/compress.c
+@@ -517,7 +517,7 @@
+ 
+ 	return OKDATA;
+ err:
+-	strlcpy((char *)*newch, z.msg, bytes_max);
++	strlcpy((char *)*newch, z.msg ? z.msg : zError(rc), bytes_max);
+ 	*n = strlen((char *)*newch);
+ 	return ERRDATA;
+ }

+ 1 - 0
debian/patches/series

@@ -1,5 +1,6 @@
 # cherry-picked commits. Keep in chronlogical order
 cherry-pick.FILE5_28-6-g0971151.reduce-the-number-of-x-s-to-appease-linitian.patch
+cherry-pick.FILE5_28-9-g1222ebc.dont-copy-null-igor-gnatenko.patch
 
 # local modifications
 local.support-local-definitions-in-etc-magic.patch