#181: _libssh2_debug doesnt terminate buffer
------------------------------+---------------------------------------------
Reporter: john@… | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 1.2.6
Component: API | Version: 1.2.6
Keywords: | Blocks:
Blocked By: |
------------------------------+---------------------------------------------
With debug enabled the buffer produces by _libssh2_debug is note null
terminated.
As I am using by own output function this makes life more difficult as I
have to terminate it myself.
Can I suggest the following change (diff output of misc.c)
413a414
> buffer[len+1] = '\0';
I also found it useful to have the session object included in the debug as
below
408c408
< len = snprintf(buffer, sizeof(buffer), "[libssh2] %d.%06d %s: ",
---
> len = snprintf(buffer, sizeof(buffer), "[libssh2 0x%p] %d.%06d %s:
",session,
-- Ticket URL: <http://trac.libssh2.org/ticket/181> libssh2 <http://trac.libssh2.org/> C library for writing portable SSH2 clients _______________________________________________ libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-develReceived on 2010-06-22