# HG changeset patch # User Mikael Berthe # Date 1403628984 -7200 # Node ID 3b26f3a58cb96b332a0d243d438c271d3b8cf5f7 # Parent 51fde9c25401573b178d6b6658da3ca7d7b63cd1 Fix command line issue reported by Minos Fix small memory corruption in strip_arg_special_chars(). strcpy() cannot be used there because the areas overlap. diff -r 51fde9c25401 -r 3b26f3a58cb9 mcabber/mcabber/utils.c --- a/mcabber/mcabber/utils.c Mon Jun 09 10:01:48 2014 +0200 +++ b/mcabber/mcabber/utils.c Tue Jun 24 18:56:24 2014 +0200 @@ -589,13 +589,17 @@ if (*p == '"') { if (!escape) { instring = !instring; - strcpy(p, p+1); + //memmove(p, p+1, strlen(p)); + for (char *t=p; *t; t++) + *t = *(t+1); p--; } else escape = FALSE; } else if (*p == '\\') { if (!escape) { - strcpy(p, p+1); + //memmove(p, p+1, strlen(p)); + for (char *t=p; *t; t++) + *t = *(t+1); p--; } escape = !escape;