From: Johan Hedberg Date: Mon, 26 Mar 2012 11:21:42 +0000 (+0300) Subject: Bluetooth: Check for minimum data length in eir_has_data_type() X-Git-Tag: v3.4-rc3~32^2^2~12^2~6 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c0c331e4c8ff6c0f7fa6cc5fd08d853d6c579c4;p=pandora-kernel.git Bluetooth: Check for minimum data length in eir_has_data_type() If passed 0 as data_length the (parsed < data_length - 1) test will be true and cause a buffer overflow. In practice we need at least two bytes for the element length and type so add a test for it to the very beginning of the function. Signed-off-by: Johan Hedberg Acked-by: Marcel Holtmann Signed-off-by: Gustavo Padovan --- Reading git-diff-tree failed