--- cvs/src/history.c +++ cvs/src/history.c @@ -970,8 +970,8 @@ save_file (dir, name, module) file_list = xrealloc (file_list, xtimes (file_max, sizeof (*fl))); } fl = &file_list[file_count++]; - fl->l_file = cp = xmalloc (dir ? strlen (dir) : 0 - + name ? strlen (name) : 0 + fl->l_file = cp = xmalloc ((dir ? strlen (dir) : 0) + + (name ? strlen (name) : 0) + 2); fl->l_module = module; @@ -1040,7 +1040,8 @@ expand_modules () while (isspace(*line)) line++; \ hr->here = line; \ while ((c = *line++) && c != '|') ; \ - if (!c) return; line[-1] = '\0'; \ + if (!c) return; \ + line[-1] = '\0'; \ } while (0) static void