From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c9CtO-0006yC-La for barebox@lists.infradead.org; Tue, 22 Nov 2016 15:21:55 +0000 From: =?UTF-8?q?Ulrich=20=C3=96lmann?= Date: Tue, 22 Nov 2016 16:21:21 +0100 Message-Id: <20161122152121.25568-1-u.oelmann@pengutronix.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] ubi: Only read necessary size when reading the VID header To: Barebox List QmFzZWQgb24ga2VybmVsIGNvbW1pdCA4YThlOGQyZmRiYWIgKCJ1Ymk6IE9ubHkgcmVhZCBuZWNl c3Nhcnkgc2l6ZSB3aGVuIHJlYWRpbmcKdGhlIFZJRCBoZWFkZXIiKSBieSBTYXNjaGEgSGF1ZXIg PHMuaGF1ZXJAcGVuZ3V0cm9uaXguZGU+OgoKICAgIFdoZW4gcmVhZGluZyB0aGUgdmlkIGhkciBm cm9tIHRoZSBkZXZpY2UgVUJJIGFsd2F5cyByZWFkcyBhIHdob2xlCiAgICBwYWdlLiBJbnN0ZWFk LCByZWFkIG9ubHkgdGhlIGRhdGEgd2UgYWN0dWFsbHkgbmVlZCBhbmQgc3BlZWQgdXAKICAgIGF0 dGFjaG1lbnQgb2YgVUJJIGRldmljZXMgYnkgcG90ZW50aWFsbHkgbWFraW5nIHVzZSBvZiByZWFk aW5nCiAgICBzdWJwYWdlcyBpZiB0aGUgTkFORCBkcml2ZXIgc3VwcG9ydHMgaXQuCgogICAgU2lu Y2UgdGhlIFZJRCBoZWFkZXIgbWF5IGJlIGF0IG9mZnNldCB2aWRfaGRyX3NoaWZ0IGluIHRoZS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