X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fmsgbase.c;h=291d54fdda6245be56812a34f4fd6018940f003c;hp=107b1d5cb2a9fa32f73f34aea6d27c433d4d4fda;hb=7e5d9e93cc7fdc560eac95647fe329d818444226;hpb=b4d882d541fff286c3b3bc9de34c2881b32bd3e4 diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 107b1d5cb..291d54fdd 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -744,7 +744,7 @@ void cmd_msgs(char *cmdbuf) template->cm_magic = CTDLMESSAGE_MAGIC; template->cm_anon_type = MES_NORMAL; - while(client_getln(buf, sizeof buf), strcmp(buf,"000")) { + while(client_getln(buf, sizeof buf) >= 0 && strcmp(buf,"000")) { extract_token(tfield, buf, 0, '|', sizeof tfield); extract_token(tvalue, buf, 1, '|', sizeof tvalue); for (i='A'; i<='Z'; ++i) if (msgkeys[i]!=NULL) {