diff options
author | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-26 13:33:23 -0700 |
---|---|---|
committer | Laxmikant Rashinkar <LK.Rashinkar@gmail.com> | 2014-07-26 13:33:23 -0700 |
commit | 27055d5762d23ae3996e7e41ef45ef6454fa2d65 (patch) | |
tree | b45025733988961e08bde0c7e495f73c939a9937 /sesman/tools | |
parent | fde7be5151f7db096610cb59ca964e22e6af79fb (diff) | |
download | xrdp-proprietary-27055d5762d23ae3996e7e41ef45ef6454fa2d65.tar.gz xrdp-proprietary-27055d5762d23ae3996e7e41ef45ef6454fa2d65.zip |
coverity: improper use of negative value
Diffstat (limited to 'sesman/tools')
-rw-r--r-- | sesman/tools/sesadmin.c | 6 | ||||
-rw-r--r-- | sesman/tools/sesrun.c | 3 | ||||
-rw-r--r-- | sesman/tools/sestest.c | 3 |
3 files changed, 12 insertions, 0 deletions
diff --git a/sesman/tools/sesadmin.c b/sesman/tools/sesadmin.c index 979a22f9..32789c6d 100644 --- a/sesman/tools/sesadmin.c +++ b/sesman/tools/sesadmin.c @@ -107,6 +107,12 @@ int main(int argc, char **argv) scp_init(&logging); sock = g_tcp_socket(); + if (sock < 0) + { + LOG_DBG("Socket open error, g_tcp_socket() failed\n"); + return 1; + } + s = scp_session_create(); c = scp_connection_create(sock); diff --git a/sesman/tools/sesrun.c b/sesman/tools/sesrun.c index 7ac10102..a9181583 100644 --- a/sesman/tools/sesrun.c +++ b/sesman/tools/sesrun.c @@ -75,7 +75,10 @@ main(int argc, char **argv) init_stream(in_s, 8192); make_stream(out_s); init_stream(out_s, 8192); + sck = g_tcp_socket(); + if (sck < 0) + return 1; if (g_tcp_connect(sck, argv[1], g_cfg.listen_port) == 0) { diff --git a/sesman/tools/sestest.c b/sesman/tools/sestest.c index f2823eb6..d42b31de 100644 --- a/sesman/tools/sestest.c +++ b/sesman/tools/sestest.c @@ -38,6 +38,9 @@ int main(int argc, char **argv) scp_init(&log); sock = g_tcp_socket(); + if (sock < 0) + return 1; + s = scp_session_create(); c = scp_connection_create(sock); |