On Oct 2, 2009, at 1:55 PM, Daniel Stenberg wrote:

Hello!

On IRC just a while ago it struck us that when using the libssh2_scp_recv() function, it is necessary that the app is built with the same large-file support enabled/disabled as the libssh2 itself was - as various systems provide different 'struct stat' layouts depending on that.

In this case, the app didn't have it and the lib had it and that caused the lib to overwrite memory... :-(

I guess this is a proof that libssh2_scp_recv() has an API not good enough.


Wouldn't it be possible to make a function for runtime, compile time would be even be better, that would allow programs linking with libssh2, ie cURL, to see the size of the 'struct stat' as a way of seeing if it was build with large files. Or possible set a flag in the installed .h files stating if it was compiled with or without large files?

Jim

--

/"\   ASCII Ribbon Campaign  .
\ / - NO HTML/RTF in e-mail  .
 X  - NO Word docs in e-mail .
/ \ -----------------------------------------------------------------
                     http://www.FreeBSD.org     The Power to Serve
[email protected]  http://www.TheHousleys.net
---------------------------------------------------------------------
Progress (n) : What led from smart users in front of dumb terminals to
dumb users in front of smart terminals.


_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to