[PATCH] zlib double-free fix

Lucio Maciel (abslucio@terra.com.br)
Tue, 12 Mar 2002 10:52:15 -0300


This is a multi-part message in MIME format.

--Multipart_Tue__12_Mar_2002_10:52:15_-0300_08268b98
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

Forgot to attach the diff... sorry...
so here it goes..

Here is a small patch to fix the double-free in drivers/net/zlib.c

its against 2.4.19-pre3 but works fine in others versions

-- 
::: Lucio Maciel
::: abslucio@terra.com.br
::: Absoluta.Net :::

--Multipart_Tue__12_Mar_2002_10:52:15_-0300_08268b98 Content-Type: application/octet-stream; name="zlib.diff" Content-Disposition: attachment; filename="zlib.diff" Content-Transfer-Encoding: base64

LS0tIGRyaXZlcnMvbmV0L3psaWIuYy5vcmlnCVR1ZSBNYXIgMTIgMTA6MTU6MTYgMjAwMgorKysg ZHJpdmVycy9uZXQvemxpYi5jCVR1ZSBNYXIgMTIgMTA6Mjk6MjggMjAwMgpAQCAtMzg2MCwxMCAr Mzg2MCwxMiBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcy0+c3ViLnRyZWVzLnRi LCB6KTsKICAgICAgIGlmICh0ICE9IFpfT0spCiAgICAgICB7Ci0gICAgICAgIFpGUkVFKHosIHMt PnN1Yi50cmVlcy5ibGVucyk7CiAgICAgICAgIHIgPSB0OwogICAgICAgICBpZiAociA9PSBaX0RB VEFfRVJST1IpCisgICAgICAgIHsKICAgICAgICAgICBzLT5tb2RlID0gQkFEQjsKKyAgICAgICAg ICBaRlJFRSh6LCBzLT5zdWIudHJlZXMuYmxlbnMpOworICAgICAgICB9CiAgICAgICAgIExFQVZF CiAgICAgICB9CiAgICAgICBzLT5zdWIudHJlZXMuaW5kZXggPSAwOwpAQCAtMzkyOCwxNCArMzkz MCwxNyBAQAogI2VuZGlmCiAgICAgICAgIHQgPSBpbmZsYXRlX3RyZWVzX2R5bmFtaWMoMjU3ICsg KHQgJiAweDFmKSwgMSArICgodCA+PiA1KSAmIDB4MWYpLAogICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHMtPnN1Yi50cmVlcy5ibGVucywgJmJsLCAmYmQsICZ0bCwgJnRkLCB6KTsK LSAgICAgICAgWkZSRUUoeiwgcy0+c3ViLnRyZWVzLmJsZW5zKTsKICAgICAgICAgaWYgKHQgIT0g Wl9PSykKICAgICAgICAgewogICAgICAgICAgIGlmICh0ID09ICh1SW50KVpfREFUQV9FUlJPUikK KyAgICAgICAgICB7CiAgICAgICAgICAgICBzLT5tb2RlID0gQkFEQjsKKyAgICAgICAgICAgIFpG UkVFKHosIHMtPnN1Yi50cmVlcy5ibGVucyk7CisgICAgICAgICAgfQogICAgICAgICAgIHIgPSB0 OwogICAgICAgICAgIExFQVZFCiAgICAgICAgIH0KKyAgICAgICAgWkZSRUUoeiwgcy0+c3ViLnRy ZWVzLmJsZW5zKTsKICAgICAgICAgVHJhY2V2KChzdGRlcnIsICJpbmZsYXRlOiAgICAgICB0cmVl cyBvaywgJWQgKiAlZCBieXRlcyB1c2VkXG4iLAogICAgICAgICAgICAgICBpbmZsYXRlX2h1ZnRz LCBzaXplb2YoaW5mbGF0ZV9odWZ0KSkpOwogICAgICAgICBpZiAoKGMgPSBpbmZsYXRlX2NvZGVz X25ldyhibCwgYmQsIHRsLCB0ZCwgeikpID09IFpfTlVMTCkK

--Multipart_Tue__12_Mar_2002_10:52:15_-0300_08268b98-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/