]> code.citadel.org Git - citadel.git/commitdiff
* Fixed a crashy crashy bug in the AGUP protocol function in the client
authorArt Cancro <ajc@citadel.org>
Sun, 8 Sep 2002 03:48:48 +0000 (03:48 +0000)
committerArt Cancro <ajc@citadel.org>
Sun, 8 Sep 2002 03:48:48 +0000 (03:48 +0000)
citadel/ChangeLog
citadel/citadel_ipc.c

index 6c0d6a6a680480d257ab1cb54d65b90c25acb232..491b5519b3db81e46edad6b062169ac59e8aac03 100644 (file)
@@ -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 <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 85ad5b10f304a8e2933354e97edb05da583e7b95..6ca729fff5f26909ae90af1be1b1328a0ba77aca 100644 (file)
@@ -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;
 }