From: David Howells Date: Thu, 4 Oct 2012 13:21:23 +0000 (+0100) Subject: X.509: Fix indefinite length element skip error handling X-Git-Tag: v3.7-rc1~2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbadc17683e6c673a69b236c0f041b931cc55c42;p=pandora-kernel.git X.509: Fix indefinite length element skip error handling asn1_find_indefinite_length() returns an error indicator of -1, which the caller asn1_ber_decoder() places in a size_t (which is usually unsigned) and then checks to see whether it is less than 0 (which it can't be). This can lead to the following warning: lib/asn1_decoder.c:320 asn1_ber_decoder() warn: unsigned 'len' is never less than zero. Instead, asn1_find_indefinite_length() update the caller's idea of the data cursor and length separately from returning the error code. Reported-by: Dan Carpenter Signed-off-by: David Howells Signed-off-by: Rusty Russell --- Reading git-diff-tree failed