Marc Hoersken
dc199ed03a
packet.c: i < 256 was always true and i would overflow to 0
...
Visualize that the 0-termination is intentional, because the array
is later passed to strlen within _libssh2_packet_askv.
2014-12-26 11:21:10 +01:00
Marc Hoersken
8f799f98d9
silence multiple data conversion warnings
2014-12-26 11:05:34 +01:00
Daniel Stenberg
637c90959b
agent_connect_unix: make sure there's a trailing zero
...
... if the path name was too long. Reported by Coverity CID 89801.
2014-12-23 20:05:16 +01:00
Marc Hoersken
8a731d6217
examples on Windows: use native SOCKET-type instead of int
...
And check return values accordingly.
2014-12-22 17:03:42 +01:00
Marc Hoersken
d85f9a689f
userauth.c: improve readability and clarity of for-loops
2014-12-22 16:18:36 +01:00
Daniel Stenberg
031566f9cc
calloc: introduce LIBSSH2_CALLOC()
...
A simple function using LIBSSH2_ALLOC + memset, since this pattern was
used in multiple places and this simplies code in general.
2014-12-22 15:59:21 +01:00
Marc Hoersken
977a3b6a76
libssh2_priv.h: Ignore session, context and format parameters
2014-12-15 01:16:00 +01:00
Marc Hoersken
34dc1d61b4
x11 example: check return value of socket function
2014-12-15 01:10:29 +01:00
Marc Hoersken
be95032e29
examples: fixed mixed line-endings introduced with aedfba25b8
2014-12-15 01:09:13 +01:00
Marc Hoersken
c0bface8a7
wincng.c: explicitly ignore BCrypt*AlgorithmProvider return codes
...
Fixes VS2012 code analysis warning C6031:
return value ignored: <function> could return unexpected value
2014-12-15 01:00:52 +01:00
Marc Hoersken
f31c9fb221
wincng.c: fix possible invalid memory write access
...
Fixes VS2012 code analysis warning C6386:
buffer overrun: accessing 'pbOutput', the writable size is
'cbOutput' bytes, but '3' bytes may be written: libssh2 wincng.c 610
2014-12-15 01:00:48 +01:00
Marc Hoersken
f89bed9571
tests on Windows: check for WSAStartup return code
...
Fixes VS2012 code analysis warning C6031:
return value ignored: <function> could return unexpected value
2014-12-15 01:00:36 +01:00
Marc Hoersken
bc9d735664
wincng.c: fix possible NULL pointer de-reference of bignum
...
Fixes VS2012 code analysis warning C6011:
dereferencing NULL pointer 'bignum'. libssh2 wincng.c 1567
2014-12-15 00:59:11 +01:00
Marc Hoersken
06ff22f1a6
wincng.c: fix possible use of uninitialized memory
...
Fixes VS2012 code analysis warning C6001:
using uninitialized memory 'cbDecoded'. libssh2 wincng.c 553
2014-12-15 00:59:09 +01:00
Marc Hoersken
e57f29f8f6
packet.c: fix possible NULL pointer de-reference within listen_state
...
Fixes VS2012 code analysis warning C6011:
dereferencing NULL pointer 'listen_state->channel'. libssh2 packet.c 221
2014-12-15 00:59:05 +01:00
Marc Hoersken
1c1699545b
kex.c: fix possible NULL pointer de-reference with session->kex
...
Fixes VS2012 code analysis warning C6011:
dereferencing NULL pointer 'session->kex'. libssh2 kex.c 1761
2014-12-15 00:59:03 +01:00
Marc Hoersken
abcc0d370f
agent.c: check return code of MapViewOfFile
...
Fixes VS2012 code analysis warning C6387: 'p+4' may be '0':
this does not adhere to the specification for the function
'memcpy': libssh2 agent.c 330
Fixes VS2012 code analysis warning C6387: 'p' may be '0':
this does not adhere to the specification for the function
'UnmapViewOfFile': libssh2 agent.c 333
2014-12-15 00:59:00 +01:00
Marc Hoersken
977dbb7511
examples on Windows: check for socket return code
...
Fixes VS2012 code analysis warning C28193:
The variable holds a value that must be examined
2014-12-15 00:58:57 +01:00
Marc Hoersken
aedfba25b8
examples on Windows: check for WSAStartup return code
...
Fixes VS2012 code analysis warning C6031:
return value ignored: <function> could return unexpected value
2014-12-15 00:58:56 +01:00
Guenter Knauf
19f1402f1d
wincng.c: silent some more gcc compiler warnings.
2014-12-11 21:39:47 +01:00
Guenter Knauf
df5c61dbca
wincng.c: silent gcc compiler warnings.
2014-12-11 21:35:18 +01:00
Guenter Knauf
1689315fce
Watcom build: added support for WinCNG build.
2014-12-08 02:56:34 +01:00
Guenter Knauf
7f7e65c54b
build: updated dependencies in makefiles.
2014-12-07 16:16:21 +01:00
Daniel Stenberg
751e0087a8
configure: change LIBS not LDFLAGS when checking for libs
...
Closes #289
Patch-by: maurerpe
2014-12-04 22:45:30 +01:00
Guenter Knauf
600f26ce6e
MinGW build: some more GNUMakefile tweaks.
...
test/GNUmakefile: added architecture autodetection; added switches to
CFLAGS and RCFLAGS to make sure that the right architecture is used.
Added support to build with WinCNG.
2014-12-03 16:24:35 +01:00
Guenter Knauf
3260beb07a
sftpdir.c: added authentication method detection.
...
Stuff copied over from ssh2.c to make testing a bit easier.
2014-12-03 15:19:32 +01:00
Guenter Knauf
01a6210ab7
NMake build: fixed LIBS settings.
2014-12-01 13:21:50 +01:00
Guenter Knauf
6a3b5487cb
NMake build: added support for WinCNG build.
2014-11-30 18:39:57 +01:00
Guenter Knauf
e4ba5fabec
MinGW build: some GNUMakefile tweaks.
...
Added architecture autodetection; added switches to CFLAGS and
RCFLAGS to make sure that the right architecture is used.
Added support to build with WinCNG.
2014-11-30 16:19:01 +01:00
Guenter Knauf
46f017e751
MinGW build: Fixed redefine warnings.
2014-11-30 16:03:58 +01:00
Guenter Knauf
12adbc28b8
Updated copyright year.
2014-11-30 15:48:55 +01:00
Daniel Stenberg
424a27e007
COPYING: bump the copyright year
2014-08-31 00:41:58 +02:00
Dan Fandrich
1e4fb7ee9f
docs: fixed a bunch of typos
2014-07-28 23:55:34 +02:00
Dan Fandrich
7b80a188dd
docs: added missing libssh2_session_handshake.3 file
2014-07-28 23:54:55 +02:00
Marc Hoersken
9d50d43a83
wincng.c: specify the required libraries for dependencies using MSVC
...
Initially reported by Bob Kast as "for MS VS builds, specify the
libraries that are required so they don't need to go into all
project files that may use this library". Thanks a lot.
2014-05-19 20:45:14 +02:00
Bob Kast
c355d31ff9
windows build: do not export externals from static library
...
If you are building a DLL, then you need to explicitly export each
entry point. When building a static library, you should not.
libssh2 was exporting the entry points whether it was building a DLL or a
static library. To elaborate further, if libssh2 was used as a static
library, which was being linked into a DLL, the libssh2 API would be
exported from that separate DLL.
2014-05-19 19:17:30 +02:00
Mikhail Gusarov
18fe507324
Fix typos in manpages
2014-05-19 10:24:58 +02:00
Marc Hoersken
d63e32dd30
wincng.c: Fixed memory leak in case of an error during ASN.1 decoding
2014-05-18 14:58:21 +02:00
Marc Hoersken
c32e82e97b
configure: Display individual crypto backends on separate lines
...
This avoids line-wrapping in between parameters and makes the
error message look like the following:
configure: error: No crypto library found!
Try --with-libssl-prefix=PATH
or --with-libgcrypt-prefix=PATH
or --with-wincng on Windows
2014-05-18 12:47:42 +02:00
Bob Kast
7d4b5a8e07
libssh2_priv.h: a 1 bit bit-field should be unsigned
...
some compilers may not like this
2014-05-18 12:25:56 +02:00
Marc Hoersken
200784c4e7
knownhost.c: Fixed warning that pointer targets differ in signedness
2014-05-18 11:51:19 +02:00
Marc Hoersken
b22b23703c
wincng.c: Fixed warning about pointer targets differing in signedness
2014-05-18 11:39:22 +02:00
Marc Hoersken
0e4e14109a
tcpip-forward.c: Fixed warning that pointer targets differ in signedness
...
libssh2_channel_forward_listen_ex uses ints instead of unsigned ints.
2014-05-18 11:35:19 +02:00
Marc Hoersken
5bcc2d4629
misc.c: Fixed warning about mixed declarations and code
2014-05-18 11:15:49 +02:00
Marc Hoersken
33df559967
libgcrypt.h: Fixed warning about pointer targets differing in signedness
2014-05-18 10:57:36 +02:00
Marc Hoersken
26f6d71885
wincng.h: Fixed warning about pointer targets differing in signedness
2014-05-18 10:57:17 +02:00
Marc Hoersken
62c91e2cd4
misc.c: Fixed warning about unused parameter abstract
2014-05-18 10:23:18 +02:00
Marc Hoersken
b9dc6112d7
tcpip-forward.c: Removed unused variables shost, sport and sockopt
2014-05-18 10:16:24 +02:00
Marc Hoersken
106bacdebc
wincng.h: Added forward declarations for all WinCNG functions
...
Initially reported by Bob Kast as "Wincng - define function
prototypes for wincng routines". Thanks a lot.
Also replaced structure definitions with type definitions.
2014-05-18 00:51:31 +02:00
Bob Kast
23dec383f7
libssh2.h: on Windows, a socket is of type SOCKET, not int
2014-05-18 00:25:47 +02:00