From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.visioncatalog.com ([217.6.246.34] helo=root.phytec.de) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YaLjv-0004kj-CG for barebox@lists.infradead.org; Tue, 24 Mar 2015 10:07:17 +0000 Received: from idefix.phytec.de (idefix.phytec.de [172.16.0.10]) by root.phytec.de (Postfix) with ESMTP id E5277A0035F for ; Tue, 24 Mar 2015 11:07:51 +0100 (CET) From: =?UTF-8?q?Stefan=20M=C3=BCller-Klieser?= Date: Tue, 24 Mar 2015 11:03:52 +0100 Message-Id: <1427191433-48345-2-git-send-email-s.mueller-klieser@phytec.de> In-Reply-To: <1427191433-48345-1-git-send-email-s.mueller-klieser@phytec.de> References: <1427191433-48345-1-git-send-email-s.mueller-klieser@phytec.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v2 1/2] Revert "lzo: properly check for overruns" To: barebox@lists.infradead.org VGhpcyByZXZlcnRzIGJhcmVib3ggY29tbWl0IGVjYjFkYzBiMWU4NTliY2E5ClRoaXMgY29ycmVz cG9uZHMgdG8ga2VybmVsIGNvbW1pdCBhZjk1OGEzOGE2MGM3Y2EzZDgKCkFzIGFuYWx5c2VkIGJ5 IFdpbGxlbSBQaW5ja2FlcnMsIHRoaXMgZml4IGlzIHN0aWxsIGluY29tcGxldGUgb24KY2VydGFp biByYXJlIGNvcm5lciBjYXNlcywgYW5kIGl0IGlzIGVhc2llciB0byByZXN0YXJ0IGZyb20gdGhl Cm9yaWdpbmFsIGNvZGUuCgpSZXBvcnRlZC1ieTogV2lsbGVtIFBpbmNrYWVycyA8d2lsbGVtQGxl a2tlcnRlY2gubmV0PgpDYzogIkRvbiBBLiBCYWlsZXkiIDxkb25iQ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