gftp r978 - in trunk: . lib src/gtk src/uicommon
- From: masneyb svn gnome org
- To: svn-commits-list gnome org
- Subject: gftp r978 - in trunk: . lib src/gtk src/uicommon
- Date: Sun, 30 Nov 2008 17:55:05 +0000 (UTC)
Author: masneyb
Date: Sun Nov 30 17:55:04 2008
New Revision: 978
URL: http://svn.gnome.org/viewvc/gftp?rev=978&view=rev
Log:
2008-11-30 Brian Masney <masneyb gftp org>
* src/gtk/delete_dialog.c - fixed call to g_strdup_printf() where too
many arguments were passed in format string.
* lib/sslcommon.c - removed duplicate data variable
* src/uicommon/gftpui.c (gftpui_common_cmd_help) - fixed call to
strncat() where the supplied length was too long
Modified:
trunk/ChangeLog
trunk/lib/sslcommon.c
trunk/src/gtk/delete_dialog.c
trunk/src/uicommon/gftpui.c
Modified: trunk/lib/sslcommon.c
==============================================================================
--- trunk/lib/sslcommon.c (original)
+++ trunk/lib/sslcommon.c Sun Nov 30 17:55:04 2008
@@ -139,7 +139,6 @@
if (strcmp (extstr, "subjectAltName") == 0)
{
- unsigned char *data;
STACK_OF(CONF_VALUE) *val;
CONF_VALUE *nval;
X509V3_EXT_METHOD *meth;
@@ -148,16 +147,14 @@
if (!(meth = X509V3_EXT_get (ext)))
break;
- data = ext->value->data;
-
#if (OPENSSL_VERSION_NUMBER > 0x00907000L)
if (meth->it)
- ext_str = ASN1_item_d2i (NULL, &data, ext->value->length,
+ ext_str = ASN1_item_d2i (NULL, &ext->value->data, ext->value->length,
ASN1_ITEM_ptr (meth->it));
else
- ext_str = meth->d2i (NULL, &data, ext->value->length);
+ ext_str = meth->d2i (NULL, &ext->value->data, ext->value->length);
#else
- ext_str = meth->d2i(NULL, &data, ext->value->length);
+ ext_str = meth->d2i(NULL, &ext->value->data, ext->value->length);
#endif
val = meth->i2v(meth, ext_str, NULL);
@@ -179,7 +176,7 @@
}
if (!ok && (subj = X509_get_subject_name (cert)) &&
- X509_NAME_get_text_by_NID (subj, NID_commonName, data, 256) > 0)
+ X509_NAME_get_text_by_NID (subj, NID_commonName, data, sizeof (data)) > 0)
{
data[sizeof (data) - 1] = '\0';
/* Check for wildcard CN (must begin with *.) */
Modified: trunk/src/gtk/delete_dialog.c
==============================================================================
--- trunk/src/gtk/delete_dialog.c (original)
+++ trunk/src/gtk/delete_dialog.c Sun Nov 30 17:55:04 2008
@@ -62,7 +62,7 @@
}
else if (transfer->numfiles > 0)
{
- tempstr = g_strdup_printf (_("Are you sure you want to delete these %ld files"), transfer->numfiles, transfer->numdirs);
+ tempstr = g_strdup_printf (_("Are you sure you want to delete these %ld files"), transfer->numfiles);
}
else if (transfer->numdirs > 0)
{
Modified: trunk/src/uicommon/gftpui.c
==============================================================================
--- trunk/src/uicommon/gftpui.c (original)
+++ trunk/src/uicommon/gftpui.c Sun Nov 30 17:55:04 2008
@@ -811,6 +811,7 @@
for (i=0; i<numrows; i++)
{
strncpy (commands, "\t", sizeof (commands));
+ size_t cmd_len = sizeof(commands) - strlen (commands);
for (j=0; j<numcols; j++)
{
@@ -820,7 +821,8 @@
g_snprintf (cmdstr, sizeof (cmdstr), "%-10s",
gftpui_common_commands[ele].command);
- strncat (commands, cmdstr, sizeof (commands));
+ strncat (commands, cmdstr, cmd_len);
+ cmd_len -= strlen(cmdstr);
}
gftpui_common_logfunc (gftp_logging_misc_nolog, request, "%s\n",
commands);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]