mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-10 15:48:06 -05:00
My ASN.1 decoder returned wrong IDs for anything above 0x1E! Good
job it's never had to yet. Ahem. [originally from svn r3479]
This commit is contained in:
parent
150b6e0a87
commit
72c53fcb75
3
import.c
3
import.c
@ -160,12 +160,11 @@ static int ber_read_id_len(void *source, int sourcelen,
|
||||
if ((*p & 0x1F) == 0x1F) {
|
||||
*id = 0;
|
||||
while (*p & 0x80) {
|
||||
*id = (*id << 7) | (*p & 0x7F);
|
||||
p++, sourcelen--;
|
||||
if (sourcelen == 0)
|
||||
return -1;
|
||||
*id = (*id << 7) | (*p & 0x7F);
|
||||
}
|
||||
*id = (*id << 7) | (*p & 0x7F);
|
||||
p++, sourcelen--;
|
||||
} else {
|
||||
*id = *p & 0x1F;
|
||||
|
Loading…
x
Reference in New Issue
Block a user