mirror of
https://github.com/curl/curl.git
synced 2026-05-28 17:37:54 +03:00
x509asn1: fix operator order in do_pubkey
Check the range before reading data, as it would otherwise read one byte too many. Reported-by: Andrew Nesbit Closes #21533
This commit is contained in:
parent
3ce10063f1
commit
cda0268593
1 changed files with 1 additions and 1 deletions
|
|
@ -1013,7 +1013,7 @@ static int do_pubkey(struct Curl_easy *data, int certnum, const char *algo,
|
|||
return 1;
|
||||
|
||||
/* Compute key length. */
|
||||
for(q = elem.beg; !*q && q < elem.end; q++)
|
||||
for(q = elem.beg; q < elem.end && !*q; q++)
|
||||
;
|
||||
len = ((elem.end - q) * 8);
|
||||
if(len) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue