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.
--- 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;