Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37779214
en ru br
ALT Linux repositórios
S:2.1-alt3
5.0: 2.1-alt1
4.1: 2.1-alt1
4.0: 2.1-alt1
3.0: 2.0-alt4

Group :: Arquivamento/Compressão
RPM: rzip

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: rzip-2.1-CVE-2017-8364.patch
Download


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;
 	}
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009