From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: X.509: Add an ASN.1 decoder
Date: Wed, 03 Oct 2012 11:17:58 +0000 [thread overview]
Message-ID: <20121003111758.GA3954@elgon.mountain> (raw)
Hello David Howells,
The patch 788380fa26a6: "X.509: Add an ASN.1 decoder" from Sep 24,
2012, leads to the following warning:
lib/asn1_decoder.c:320 asn1_ber_decoder()
warn: unsigned 'len' is never less than zero.
lib/asn1_decoder.c
315 skip_data:
316 if (!(flags & FLAG_CONS)) {
317 if (flags & FLAG_INDEFINITE_LENGTH) {
318 len = asn1_find_indefinite_length(
319 data + dp, datalen - dp, &errmsg, &dp);
320 if (len < 0)
^^^^^^^
asn1_find_indefinite_length() returns -1 on error but "len" is unsigned.
321 goto error;
322 }
323 pr_debug("- LEAF: %zu\n", len);
324 dp += len;
325 }
regards,
dan carpenter
reply other threads:[~2012-10-03 11:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20121003111758.GA3954@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox