#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 salva):
I have submitted two new patches, one for every one of your observations.
The first one keeps the length of the key-type and uses it. Actually I
have found that the host and comment slots are affected by the same issue,
so I have also modified the code related to those, keeping their lengths
in the known_host struct, and using memcpy to move then into the buffer
instead of snprintf(..., "%s", ...) which stops at nulls.
Regarding the usage of "goto", well, I don't see it as inappropriate in
that case, but it is your code and so your choice. The second patch
replaces the jumps by calls to _libssh2_error.
-- Ticket URL: <https://trac.libssh2.org/ticket/276#comment:2> libssh2 <https://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2013-10-06