* inetconf.c: in save_inetconf(), eliminate sizeof(x) where x is a pointer
authorArt Cancro <ajc@citadel.org>
Mon, 20 Jun 2005 03:47:44 +0000 (03:47 +0000)
committerArt Cancro <ajc@citadel.org>
Mon, 20 Jun 2005 03:47:44 +0000 (03:47 +0000)
  to a heap-allocated buffer rather than a char[xxx].  This fixes a problem
  reported by at least one site where the Internet configuration screen
  was malfunctioning.

webcit/ChangeLog
webcit/inetconf.c

index 0501db49d4d84f1d744742160abbc30b8fa434d7..d95959dee18a7113de6a128d1a9fadef387d6d53 100644 (file)
@@ -1,4 +1,10 @@
 $Log$
+Revision 619.6  2005/06/20 03:47:44  ajc
+* inetconf.c: in save_inetconf(), eliminate sizeof(x) where x is a pointer
+  to a heap-allocated buffer rather than a char[xxx].  This fixes a problem
+  reported by at least one site where the Internet configuration screen
+  was malfunctioning.
+
 Revision 619.5  2005/06/19 04:11:52  ajc
 * Integrated the second batch of new icons.
 
@@ -2620,4 +2626,3 @@ Sun Dec  6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
 
 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
        * webserver.c: warning fix
-
index 3da1719a6dccac92b9ad1e205722a046d1650ee6..5bfc232c2ba0ef29a9ffc1db03a42348c721f2f6 100644 (file)
@@ -172,10 +172,10 @@ void save_inetconf(void) {
 
        strcpy(newconfig, "");
        serv_printf("CONF GETSYS|application/x-citadel-internet-config");
-       serv_getln(buf, sizeof buf);
-       if (buf[0] == '1') while (serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
-               extract_token(ename, buf, 0, '|', sizeof ename);
-               extract_token(etype, buf, 1, '|', sizeof etype);
+       serv_getln(buf, SIZ);
+       if (buf[0] == '1') while (serv_getln(buf, SIZ), strcmp(buf, "000")) {
+               extract_token(ename, buf, 0, '|', SIZ);
+               extract_token(etype, buf, 1, '|', SIZ);
                if (strlen(buf) == 0) {
                        /* skip blank lines */
                }
@@ -192,7 +192,7 @@ void save_inetconf(void) {
        }
 
        serv_printf("CONF PUTSYS|application/x-citadel-internet-config");
-       serv_getln(buf, sizeof buf);
+       serv_getln(buf, SIZ);
        if (buf[0] == '4') {
                serv_puts(newconfig);
                if (!strcasecmp(bstr("oper"), "add")) {