This mailing list has been abandoned! Subscribe to and use the new list
instead: http://cool.haxx.se/mailman/listinfo/libssh2-devel
----------------------------------------------------------------------
Bugs item #2815836, was opened at 2009-07-02 16:08
Message generated for change (Tracker Item Submitted) made by markmcpherson
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2815836&group_id=125852
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Mark McPherson (markmcpherson)
Assigned to: Nobody/Anonymous (nobody)
Summary: Error using custom allocator in libssh2_session_init_ex
Initial Comment:
The libssh2_session_init_ex allows you to specify custom memory allocation functions and a void *abstract arg. These functions are supposed to be called passing a ptr to the original abstract ptr arg (i.e. void **abstract).
However, on the very first call, they are passed the abstract ptr itself rather than the doubly dereferenced pointer. This causes allocation code that utilizes that ptr to crash.
The source code for libssh2_session_init_ex includes the following:
session = local_alloc(sizeof(LIBSSH2_SESSION), abstract);
This should probably be changed to read
session = local_alloc(sizeof(LIBSSH2_SESSION), &abstract);
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=703942&aid=2815836&group_id=125852
------------------------------------------------------------------------------
_______________________________________________
libssh2-devel mailing list
libssh2-devel_at_lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel
Received on 2009-07-02