#include <string.h>
#include <limits.h>
+#include <libcitadel.h>
#include "auth.h"
#include "citadel.h"
#include "server.h"
#include "control.h"
#include "msgbase.h"
#include "config.h"
-#include "tools.h"
#include "citserver.h"
#include "citadel_dirs.h"
#include "genstamp.h"
int i, len;
len = strlen(username);
+ if (len >= USERNAME_SIZE)
+ {
+ lprintf (CTDL_EMERG, "Username to long: %s", username);
+ cit_backtrace ();
+ len = USERNAME_SIZE - 1;
+ username[USERNAME_SIZE - 1]='\0';
+ }
for (i=0; i<=len; ++i) {
key[i] = tolower(username[i]);
}
char IndexBuf[32];
int IndexLen = 0;
+ memset (IndexBuf, 0, sizeof (IndexBuf));
/* Generate an index */
IndexLen = GenerateRelationshipIndex(IndexBuf,
newvisit->v_roomnum,