Mercurial > gftp.yaz
diff lib/sshv2.c @ 765:d553d14a2565
2006-7-13 Brian Masney <masneyb@gftp.org>
* lib/cache.c lib/config_file.c lib/fsp.c lib/ftps.c lib/gftp.h
lib/local.c lib/misc.c lib/options.h lib/protocols.c lib/rfc2068.c
lib/rfc959.c lib/sshv2.c - started to add some annotations for splint.
Fixed a few minor warnings from splint.
author | masneyb |
---|---|
date | Fri, 14 Jul 2006 00:34:11 +0000 |
parents | c8e09269c3e1 |
children | 3751478bb260 |
line wrap: on
line diff
--- a/lib/sshv2.c Fri Jul 07 20:04:42 2006 +0000 +++ b/lib/sshv2.c Fri Jul 14 00:34:11 2006 +0000 @@ -147,7 +147,7 @@ char *ret; params = request->protocol_data; - ret = g_malloc0 (len + 1); + ret = g_malloc0 ((gulong) len + 1); num = htonl (params->id++); memcpy (ret, &num, 4); @@ -211,7 +211,7 @@ va_end (argp); *logstr_len += strlen (tempstr); - *logstr = g_realloc (*logstr, *logstr_len + 1); + *logstr = g_realloc (*logstr, (gulong) *logstr_len + 1); strcat (*logstr, tempstr); curpos = tempstr; @@ -317,7 +317,7 @@ rem = len = SSH_LOGIN_BUFSIZE; diff = 0; - tempstr = g_malloc0 (len + 1); + tempstr = g_malloc0 ((gulong) len + 1); wrotepw = 0; ok = 1; @@ -394,6 +394,7 @@ break; } + clear_tempstr = 0; if (pwstrs[pwidx] != NULL) { clear_tempstr = 1; @@ -464,8 +465,6 @@ tempstr = g_realloc (tempstr, len); continue; } - else - clear_tempstr = 0; if (clear_tempstr) { @@ -532,6 +531,7 @@ case SSH_FXP_CLOSE: request->logging_function (level, request, _("%d: Close\n"), id); + break; case SSH_FXP_OPENDIR: request->logging_function (level, request, _("%d: Open Directory %s\n"), id,