Displaying 3 results from an estimated 3 matches for "linebuf_alloc".
2010 Mar 06
1
ssh-keyscan bug (not really exploitable)
...is is just a wrapper around fgets() to make it usable.
- */
-
-/* Stress-test. Increase this later. */
-#define LINEBUF_SIZE 16
-
-typedef struct {
- char *buf;
- u_int size;
- int lineno;
- const char *filename;
- FILE *stream;
- void (*errfun) (const char *,...);
-} Linebuf;
-
-static Linebuf *
-Linebuf_alloc(const char *filename, void (*errfun) (const char *,...))
-{
- Linebuf *lb;
-
- if (!(lb = malloc(sizeof(*lb)))) {
- if (errfun)
- (*errfun) ("linebuf (%s): malloc failed\n",
- filename ? filename : "(stdin)");
- return (NULL);
- }
- if (filename) {
- lb->filename =...
2001 May 14
2
openssh-2.9p1
Hi,
1. I think you should apply the attached patch to openssh-2.9p1,
otherwise ssh-keyscan on linux boxes with glibc-2.1 will experience enormous
timeout delays.
2. Is there a program like ssh-keyscan for the Version2 (dsa and rsa) keys??
regards
Peter Breitenlohner <peb at mppmu.mpg.de>
-------------- next part --------------
diff -ur openssh-2.9p1.orig/ssh-keyscan.c
2001 Jul 27
0
Updated ssh-keyscan patch for ssh2 support
...gv[argno][1])
+ fname = &argv[argno][1];
else if (++argno >= argc) {
error("missing filename for `-f'");
return (NULL);
} else
- fname = argv[argno++];
+ fname = argv[argno];
if (!strcmp(fname, "-"))
fname = NULL;
lb = Linebuf_alloc(fname, error);
- } else
+ goto double_break;
+ case 't':
+ get_keytypes = 0;
+ tname = &argv[argno][1];
+ if (!*tname) {
+ if (++argno >= argc) {
+ error("missing types for `-t'");
+ return (NULL);
+ }
+ tname = argv[argno];
+ }...