projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Jacob's last-minute testing found a couple of trivial bugs in
[u/mdw/putty]
/
import.c
diff --git
a/import.c
b/import.c
index
c43eca4
..
d1ab751
100644
(file)
--- a/
import.c
+++ b/
import.c
@@
-582,6
+582,7
@@
struct ssh2_userkey *openssh_read(const Filename *filename, char *passphrase)
if (ret < 0 || id != 2 ||
key->keyblob+key->keyblob_len-p < len) {
errmsg = "ASN.1 decoding failure";
if (ret < 0 || id != 2 ||
key->keyblob+key->keyblob_len-p < len) {
errmsg = "ASN.1 decoding failure";
+ retval = SSH2_WRONG_PASSPHRASE;
goto error;
}
goto error;
}
@@
-1323,7
+1324,7
@@
struct ssh2_userkey *sshcom_read(const Filename *filename, char *passphrase)
* Strip away the containing string to get to the real meat.
*/
len = GET_32BIT(ciphertext);
* Strip away the containing string to get to the real meat.
*/
len = GET_32BIT(ciphertext);
- if (len > cipherlen-4) {
+ if (len
< 0 || len
> cipherlen-4) {
errmsg = "containing string was ill-formed";
goto error;
}
errmsg = "containing string was ill-formed";
goto error;
}