From 46a8d3c62dd117ec245e5f6232eabdb1b60e8323 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 20 Jun 2005 03:47:44 +0000 Subject: [PATCH] * 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. --- webcit/ChangeLog | 7 ++++++- webcit/inetconf.c | 10 +++++----- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/webcit/ChangeLog b/webcit/ChangeLog index 0501db49d..d95959dee 100644 --- a/webcit/ChangeLog +++ b/webcit/ChangeLog @@ -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 1998-12-03 Nathan Bryant * webserver.c: warning fix - diff --git a/webcit/inetconf.c b/webcit/inetconf.c index 3da1719a6..5bfc232c2 100644 --- a/webcit/inetconf.c +++ b/webcit/inetconf.c @@ -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")) { -- 2.30.2