* blah
authorArt Cancro <ajc@citadel.org>
Sat, 3 Aug 2002 04:24:06 +0000 (04:24 +0000)
committerArt Cancro <ajc@citadel.org>
Sat, 3 Aug 2002 04:24:06 +0000 (04:24 +0000)
citadel/citadel_ipc.c

index a0ac55bde953e1885d3a8b670a9d90a7160f2884..391649ff00f60d299c8c3d44bb088e65047f0ae5 100644 (file)
@@ -1972,8 +1972,7 @@ int CtdlIPCGenericCommand(const char *command, const char *to_send,
                if (proto_response[3] == '*')
                        express_msgs = 1;
                ret = atoi(proto_response);
-               memmove(proto_response, &proto_response[4],
-                               strlen(proto_response) - 3);
+               strcpy(proto_response, &proto_response[4]);
                switch (ret / 100) {
                default:                        /* Unknown, punt */
                case 2:                         /* OK */
@@ -2002,7 +2001,8 @@ int CtdlIPCGenericCommand(const char *command, const char *to_send,
                        if (to_receive && !*to_receive && bytes_to_receive) {
                                *bytes_to_receive =
                                        extract_long(proto_response, 0);
-                               *to_receive = (char *)malloc(*bytes_to_receive);
+                               *to_receive = (char *)
+                                       malloc((size_t)*bytes_to_receive);
                                if (!*to_receive) {
                                        ret = -1;
                                } else {