]> code.citadel.org Git - citadel.git/blobdiff - webcit/useredit.c
Fix of terminate problem while loading user list
[citadel.git] / webcit / useredit.c
index 85e55f43a988491d94886e2bc5b757d2703358a2..0bfc7ff37aee24f4cee429df3c2e82a050fdba4a 100644 (file)
@@ -272,8 +272,10 @@ HashList *iterate_load_userlist(StrBuf *Target, WCTemplputParams *TP)
 
                while (!Done) {
                        len = StrBuf_ServGetln(Buf);
-                       if ((len == 3) &&
-                           (strcmp(ChrPtr(Buf), "000")==0)) {
+                       if ((len <0) || 
+                           ((len == 3) &&
+                            !strcmp(ChrPtr(Buf), "000")))
+                       {
                                Done = 1;
                                break;
                        }