Fix v3 to v4 crash with a variable with longer name than value

This commit is contained in:
Orestis Floros
2017-12-09 19:50:43 +02:00
parent 9d2d602d60
commit ed22785909
2 changed files with 13 additions and 1 deletions

View File

@ -1065,7 +1065,7 @@ bool parse_file(const char *f, bool use_nagbar) {
int version = detect_version(buf);
if (version == 3) {
/* We need to convert this v3 configuration */
char *converted = migrate_config(new, stbuf.st_size);
char *converted = migrate_config(new, strlen(new));
if (converted != NULL) {
ELOG("\n");
ELOG("****************************************************************\n");