[prev in list] [next in list] [prev in thread] [next in thread]
List: ipcop-svn
Subject: [Ipcop-svn] SF.net SVN: ipcop:[2640] ipcop/trunk/src/installer
From: owes () users ! sourceforge ! net
Date: 2009-03-27 20:38:12
Message-ID: E1LnIoe-0007ar-9f () d5vjzd1 ! ch3 ! sourceforge ! com
[Download RAW message or body]
Revision: 2640
http://ipcop.svn.sourceforge.net/ipcop/?rev=2640&view=rev
Author: owes
Date: 2009-03-27 20:38:12 +0000 (Fri, 27 Mar 2009)
Log Message:
-----------
Commit #2611 removes the warnings but breaks operation.
Segfault when trying to change the admin password.
No text replacement when changing IP addresses, etc.
Fix both.
Modified Paths:
--------------
ipcop/trunk/src/installer/networking.c
ipcop/trunk/src/installer/passwords.c
Modified: ipcop/trunk/src/installer/networking.c
===================================================================
--- ipcop/trunk/src/installer/networking.c 2009-03-27 06:49:54 UTC (rev 2639)
+++ ipcop/trunk/src/installer/networking.c 2009-03-27 20:38:12 UTC (rev 2640)
@@ -381,18 +381,19 @@
char keyvalue[STRING_SIZE];
char message[STRING_SIZE_LARGE];
int numLines;
- char tmpstring[STRING_SIZE];
+ char *tmpstring;
snprintf(message, STRING_SIZE, gettext("TR_RED_CONFIGURATION_TYPE_LONG"));
text = newtTextboxReflowed(1, 1, message, 68, 0, 0, 0);
numLines = newtTextboxGetNumLines(text);
/* workaround gcc warning, there is really 1 %s there */
- snprintf(tmpstring, STRING_SIZE, gettext("TR_INTERFACE"));
+ tmpstring = strdup(gettext("TR_INTERFACE"));
snprintf(message, STRING_SIZE, tmpstring, "RED");
newtCenteredWindow(72, 14 + numLines, message);
networkform = newtForm(NULL, NULL, 0);
newtFormAddComponent(networkform, text);
+ free(tmpstring);
/* No point in translating all */
char *radio_text[CFG_RED_COUNT] =
@@ -843,7 +844,7 @@
char message[STRING_SIZE_LARGE];
int error;
int numLines;
- char tmpstring[STRING_SIZE];
+ char *tmpstring;
/* Build some key strings. */
sprintf(addresskey, "%s_1_ADDRESS", colour);
@@ -852,17 +853,19 @@
sprintf(broadcastkey, "%s_1_BROADCAST", colour);
/* workaround gcc warning, there is really 1 %s there */
- snprintf(tmpstring, STRING_SIZE, \
gettext("TR_ENTER_THE_IP_ADDRESS_INFORMATION")); + tmpstring = \
strdup(gettext("TR_ENTER_THE_IP_ADDRESS_INFORMATION")); snprintf(message, \
STRING_SIZE, tmpstring, colour); text = newtTextboxReflowed(1, 1, message, 68, 0, 0, \
0); numLines = newtTextboxGetNumLines(text);
+ free(tmpstring);
/* workaround gcc warning, there is really 1 %s there */
- snprintf(tmpstring, STRING_SIZE, gettext("TR_INTERFACE"));
+ tmpstring = strdup(gettext("TR_INTERFACE"));
snprintf(message, STRING_SIZE, tmpstring, colour);
newtCenteredWindow(72, 10 + numLines, message);
networkform = newtForm(NULL, NULL, 0);
newtFormAddComponent(networkform, text);
+ free(tmpstring);
/* Address */
addresslabel = newtTextbox(2, 2 + numLines, 18, 1, 0);
Modified: ipcop/trunk/src/installer/passwords.c
===================================================================
--- ipcop/trunk/src/installer/passwords.c 2009-03-27 06:49:54 UTC (rev 2639)
+++ ipcop/trunk/src/installer/passwords.c 2009-03-27 20:38:12 UTC (rev 2640)
@@ -101,14 +101,14 @@
char message[STRING_SIZE];
char password[STRING_SIZE];
char commandstring[STRING_SIZE];
- char tmpstring[STRING_SIZE];
+ char *tmpstring;
if (!strcmp(user, "root")) {
strcpy(message, gettext("TR_ENTER_ROOT_PASSWORD"));
}
else if (!strcmp(user, "admin")) {
/* workaround gcc warning, there is really 2 %s there */
- snprintf(tmpstring, STRING_SIZE, gettext("TR_ENTER_ADMIN_PASSWORD"));
+ tmpstring = strdup(gettext("TR_ENTER_ADMIN_PASSWORD"));
snprintf(message, STRING_SIZE, tmpstring, NAME, NAME);
}
else if (!strcmp(user, "backup")) {
This was sent by the SourceForge.net collaborative development platform, the world's \
largest Open Source development site.
------------------------------------------------------------------------------
_______________________________________________
Ipcop-svn mailing list
Ipcop-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ipcop-svn
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic