* if we get a zero length line, skip the whole processing.
authorWilfried Göesgens <willi@citadel.org>
Sun, 9 Mar 2008 22:02:31 +0000 (22:02 +0000)
committerWilfried Göesgens <willi@citadel.org>
Sun, 9 Mar 2008 22:02:31 +0000 (22:02 +0000)
webcit/who.c

index ea197868dcc8b491c008eed4266e8f7d3eb2fbe3..f13ba59d396a84c64a560e0ad2d5cef19766b973 100644 (file)
@@ -60,6 +60,8 @@ int GetWholistSection(HashList *List, time_t now)
        serv_getln(buf, sizeof buf);
        if (buf[0] == '1') {
                while (BufLen = serv_getln(buf, sizeof buf), strcmp(buf, "000")) {
+                       if (BufLen <= 0)
+                           continue;
                        User = (UserStateStruct*) malloc(sizeof(UserStateStruct));
                        User->Session = extract_int(buf, 0);