debug build (using -g and disabling all -O options), but also sets a whole
range of picky/strict compiler options depending on what compiler and version
that is used. This function is ripped right off the curl configure script,
written by yours truly. I left it using the same name as in the curl script
to 1) make it obvious where it comes from, so that 2) it will be easier to
update and keep it in sync with future modifications.
Now, this shows MAAAAAAAAANY warnings...
include/ into the src/ directory. The include/ dir is now strictly for public
headers.
Also, I removed the special win32 source package creation target in the
makefile and I modified the contact email address in configure.in to point out
the libssh2-devel list.
1 - #include <inttypes.h> and uses uint32_t (this is not very portable and
need attention as I mentioned in my separate mail)
2 - changes libssh2_blocking_read() to return ssize_t and all code that uses
this function explicitly checks its return code (better).
3 - I fixed a bunch of compiler warnings where functions got called with
unsigned char * when they expect char *. I strongly suggest we patch away
all warnings - now.
While posting a public key file to a remote server via cut-n-paste it
is possible that the key won't have the proper ending. It might not have
the standard carriage return or line feed. It might even have extra
spaces. This patch is based on the originators original patch, but is
more extensive. If reading the file ends in EOF, remove that character.
Then if there are spaces at the end of the file remove them also.
This does not fix the posibility of the same error in a multi-key file, but
it is a start.
*
* "All implementations MUST be able to process packets with
* uncompressed payload length of 32768 bytes or less and
* total packet size of 35000 bytes or less (including length,
* padding length, payload, padding, and MAC.)."
*/
Protect against an improper packet from producing unreasonable values.
Credit goes to Daniel Stenberg
The convience functions pass in the return from strlen() which is "size_t",
usually an "unsigned long". This created the possiblility of passing in
a value that could look negative.
All "int" lengths were converted to "unsigned int". Ideally they should
all become "size_t", but that is a bigger change. This is a good start.