if StrBuf_ServGetln() is called in a loop, its return value has to be checked for...
[citadel.git] / webcit / inetconf.c
index 269967e4a7f9c243d7184c66fcd6885633f76a3c..9e9a73e7737f1442229eef93c38baa003388a15c 100644 (file)
@@ -69,7 +69,10 @@ void load_inetconf(void)
        if (GetServerStatus(Buf, NULL) == 1) {
                CfgToken = NewStrBuf();
                while ((len = StrBuf_ServGetln(Buf),
-                       strcmp(ChrPtr(Buf), "000"))) {
+                       ((len >= 0) && 
+                        ((len != 3) ||
+                         strcmp(ChrPtr(Buf), "000")))))
+               {
                        Value = NewStrBuf();
  
                        StrBufExtract_token(CfgToken, Buf, 1, '|');