Correct fix for the memmove
authorColin Leroy <colin@colino.net>
Thu, 5 Jun 2014 15:57:46 +0000 (17:57 +0200)
committerColin Leroy <colin@colino.net>
Thu, 5 Jun 2014 15:57:46 +0000 (17:57 +0200)
src/account.c

index a90f370..3c33156 100644 (file)
@@ -210,7 +210,7 @@ void account_read_config_all(void)
        while (fgets(buf, sizeof(buf), fp) != NULL) {
                if (!strncmp(buf, "[Account: ", 10)) {
                        strretchomp(buf);
-                       memmove(buf, buf + 1, strlen(buf));
+                       memmove(buf, buf + 1, sizeof(buf) - 1);
                        buf[strlen(buf) - 1] = '\0';
                        debug_print("Found label: %s\n", buf);
                        ac_label_list = g_slist_append(ac_label_list,