cherry-pick.FILE5_28-9-g1222ebc.dont-copy-null-igor-gnatenko.patch 412 B

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