mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-03-22 14:39:24 -05:00
Remove a fixed-size buffer in cmdgen.c.
This patch solves the same problem as in previous commit: the fixed-size buffer may have less size than data placed into it.
This commit is contained in:
parent
5eb4efce01
commit
ed70e6014c
5
cmdgen.c
5
cmdgen.c
@ -1281,14 +1281,15 @@ int main(int argc, char **argv)
|
|||||||
setup_passphrases(NULL);
|
setup_passphrases(NULL);
|
||||||
test(0, "puttygen", "-L", filename, "-o", pubfilename, NULL);
|
test(0, "puttygen", "-L", filename, "-o", pubfilename, NULL);
|
||||||
{
|
{
|
||||||
char cmdbuf[256];
|
char *cmdbuf;
|
||||||
fp = NULL;
|
fp = NULL;
|
||||||
sprintf(cmdbuf, "ssh-keygen -l -f '%s' > '%s'",
|
cmdbuf = dupprintf("ssh-keygen -l -f '%s' > '%s'",
|
||||||
pubfilename, tmpfilename1);
|
pubfilename, tmpfilename1);
|
||||||
if (system(cmdbuf) ||
|
if (system(cmdbuf) ||
|
||||||
(fp = get_fp(tmpfilename1)) == NULL) {
|
(fp = get_fp(tmpfilename1)) == NULL) {
|
||||||
printf("UNABLE to test fingerprint matching against OpenSSH");
|
printf("UNABLE to test fingerprint matching against OpenSSH");
|
||||||
}
|
}
|
||||||
|
sfree(cmdbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user