Subject: Re: [libssh2] #181: _libssh2_debug doesnt terminate buffer

Re: [libssh2] #181: _libssh2_debug doesnt terminate buffer

From: libssh2 Trac <>
Date: Wed, 23 Jun 2010 08:25:27 -0000

#181: _libssh2_debug doesnt terminate buffer
  Reporter: john@… | Owner: bagder
      Type: enhancement | Status: assigned
  Priority: normal | Milestone: 1.2.7
 Component: API | Version: 1.2.6
Resolution: | Keywords:
    Blocks: | Blocked By:

Comment (by bagder):

 Uh, sorry I must be blind so I didn't spot the fine details. You are right
 of course. But we can't unconditionally use len+1 as then we risk
 overwriting the buffer in extreme cases. I'm fine with zero terminating
 the data as it is made as a printable string to start with.

 But I honestly don't think we should output the session pointer there. I
 it is fine to add there on your own when you're on a bug hunt, I don't
 think we need it there for everyone always.

Ticket URL: <>
libssh2 <>
C library for writing portable SSH2 clients
Received on 2010-06-23