diff options
| author | David Howells <[email protected]> | 2012-10-04 13:21:23 +0000 |
|---|---|---|
| committer | Rusty Russell <[email protected]> | 2012-10-10 09:36:39 +0000 |
| commit | dbadc17683e6c673a69b236c0f041b931cc55c42 (patch) | |
| tree | ec29aabfa428ca2c06caba94595b8c5d51a687e7 /drivers/infiniband/hw/mlx4/alias_GUID.c | |
| parent | X.509: Convert some printk calls to pr_devel (diff) | |
| download | kernel-dbadc17683e6c673a69b236c0f041b931cc55c42.tar.gz kernel-dbadc17683e6c673a69b236c0f041b931cc55c42.zip | |
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 <[email protected]>
Signed-off-by: David Howells <[email protected]>
Signed-off-by: Rusty Russell <[email protected]>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/alias_GUID.c')
0 files changed, 0 insertions, 0 deletions
