From 700aa7b23df7536354f175c7d0e29c991971bcfa Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Sun, 8 Sep 2002 03:48:48 +0000 Subject: [PATCH] * Fixed a crashy crashy bug in the AGUP protocol function in the client --- citadel/ChangeLog | 4 +++- citadel/citadel_ipc.c | 7 ++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 6c0d6a6a6..491b5519b 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,7 @@ $Log$ + Revision 600.2 2002/09/08 03:48:48 ajc + * Fixed a crashy crashy bug in the AGUP protocol function in the client + Revision 600.1 2002/09/07 03:24:23 ajc * When displaying messages using MSG4, enumerate the attachments on the client side, because the server won't add their descriptions to the @@ -3974,4 +3977,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant Fri Jul 10 1998 Art Cancro * Initial CVS import - diff --git a/citadel/citadel_ipc.c b/citadel/citadel_ipc.c index 85ad5b10f..6ca729fff 100644 --- a/citadel/citadel_ipc.c +++ b/citadel/citadel_ipc.c @@ -1564,18 +1564,16 @@ int CtdlIPCAideGetUserParameters(const char *who, struct usersupp **uret, char *cret) { register int ret; - char *aaa; + char aaa[SIZ]; if (!cret) return -2; if (!uret) return -2; if (!*uret) *uret = (struct usersupp *)calloc(1, sizeof(struct usersupp)); if (!*uret) return -1; - aaa = (char *)malloc(strlen(uret[0]->fullname) + 6); - if (!aaa) return -1; - sprintf(aaa, "AGUP %s", who); ret = CtdlIPCGenericCommand(aaa, NULL, 0, NULL, NULL, cret); + if (ret / 100 == 2) { extract(uret[0]->fullname, cret, 0); extract(uret[0]->password, cret, 1); @@ -1587,7 +1585,6 @@ int CtdlIPCAideGetUserParameters(const char *who, uret[0]->lastcall = extract_long(cret, 7); uret[0]->USuserpurge = extract_int(cret, 8); } - free(aaa); return ret; } -- 2.39.2