www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples

Archive Index This month's Index

Subject: Re: knownhost_writeline buffer length

Re: knownhost_writeline buffer length

From: Peter Stuge <peter_at_stuge.se>
Date: Wed, 24 Feb 2010 23:09:37 +0100

Alexander Lamaison wrote:
> Do we want libssh2_knownhost_writeline to NULL-terminate the line
> it writes to the buffer?
..
> The reason I ask is that the documentation says the value put in the
> outlen parameter when the buffer is too small is "the size libssh2
> wanted to store, which then is the smallest sufficient buffer it would
> require".
..
> Opinions?

Compare snprintf(), I say make the code count every byte.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-02-24

the libssh2 team