#276: do not fail when keys of unknown type are read from known_hosts file ---------------------+------------------- Reporter: salva | Owner: Type: defect | Status: new Priority: normal | Milestone: 1.4.3 Component: misc | Version: 1.4.2 Resolution: | Keywords: Blocked By: | Blocks: ---------------------+-------------------
Comment (by alamaison): Yes, we needed this functionality. Thanks. A couple of observations about knownhost.c: - On line 1019 you use `strlen` to find the length of the key type name. But this string may come from the user and they are asked to supply it as a buffer and length pair. Therefore `strlen` isn't usable here as (theoretically) it could contain anything including NUL characters. I know, who would want to do that (multi-byte character set maybe?), but the API should do what it promises. - The bottom of the file uses a `goto`. There are some legitimate uses of `goto` but this is not one of them. If multiple places need to return the buffer-too-small error then multiple places should return that error. -- Ticket URL: <https://trac.libssh2.org/ticket/276#comment:1> libssh2 <https://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel