From mboxrd@z Thu Jan 1 00:00:00 1970 From: Albert ARIBAUD Date: Fri, 19 Jul 2013 23:06:57 +0200 Subject: [U-Boot] [PATCH v3] usb: Use well-known descriptor sizes when parsing configuration In-Reply-To: <1374264728-27496-1-git-send-email-jwerner@chromium.org> References: <1374264728-27496-1-git-send-email-jwerner@chromium.org> Message-ID: <20130719230657.246af302@lilith> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Julius, On Fri, 19 Jul 2013 13:12:08 -0700, Julius Werner wrote: > The existing USB configuration parsing code relies on the descriptors' > own length values when reading through the configuration blob. Since the > size of those descriptors is always well-defined, we should rather use > the known sizes instead of trusting device-provided values to be > correct. Also adds some safety to potential out-of-order descriptors. > > Change-Id: I16f69dfdd6793aa0fe930b5148d4521f3e5c3090 > Signed-off-by: Julius Werner > --- > common/usb.c | 87 [...] As I had already asked for V2, please insert patch history right after commit message delimiter '---'. Amicalement, -- Albert.