diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-12-30 01:11:30 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-12-30 01:11:30 +0000 |
commit | 76dfef0cec9170000357d2f354e412daf48941fc (patch) | |
tree | 56647120c0ee20ab3494475c86722034cd194b02 /app-arch/rzip/files | |
parent | ccf84bcd604130256d1377cd58f0a634ae6ee20f (diff) |
gentoo resync : 30.12.2017
Diffstat (limited to 'app-arch/rzip/files')
-rw-r--r-- | app-arch/rzip/files/rzip-2.1-CVE-2017-8364.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/app-arch/rzip/files/rzip-2.1-CVE-2017-8364.patch b/app-arch/rzip/files/rzip-2.1-CVE-2017-8364.patch new file mode 100644 index 000000000000..3c65e6f1939d --- /dev/null +++ b/app-arch/rzip/files/rzip-2.1-CVE-2017-8364.patch @@ -0,0 +1,33 @@ +Index: rzip-2.1/stream.c +=================================================================== +--- rzip-2.1.orig/stream.c ++++ rzip-2.1/stream.c +@@ -147,16 +147,16 @@ static int write_u32(int f, u32 v) + return 0; + } + +-static int read_buf(int f, uchar *p, int len) ++static int read_buf(int f, uchar *p, unsigned int len) + { + int ret; + ret = read(f, p, len); + if (ret == -1) { +- err_msg("Read of length %d failed - %s\n", len, strerror(errno)); ++ err_msg("Read of length %u failed - %s\n", len, strerror(errno)); + return -1; + } + if (ret != len) { +- err_msg("Partial read!? asked for %d bytes but got %d\n", len, ret); ++ err_msg("Partial read!? asked for %u bytes but got %d\n", len, ret); + return -1; + } + return 0; +@@ -399,7 +399,7 @@ static int fill_buffer(struct stream_inf + if (sinfo->s[stream].buf) { + free(sinfo->s[stream].buf); + } +- sinfo->s[stream].buf = malloc(u_len); ++ sinfo->s[stream].buf = malloc(c_len > u_len ? c_len : u_len); + if (!sinfo->s[stream].buf) { + return -1; + } |