Fix arbitrary INT_MAX limit on referrer repr

* src/pdumper.c (print_paths_to_root_1):
Don’t assume strlen (repr) < INT_MAX.
This commit is contained in:
Paul Eggert 2019-06-20 00:05:28 -07:00
parent 5f32ac13c8
commit 4e8083ec81

View file

@ -1405,7 +1405,8 @@ print_paths_to_root_1 (struct dump_context *ctx,
Lisp_Object repr = Fprin1_to_string (referrer, Qnil);
for (int i = 0; i < level; ++i)
fputc (' ', stderr);
fprintf (stderr, "%s\n", SDATA (repr));
fwrite (SDATA (repr), 1, SBYTES (repr), stderr);
fputc ('\n', stderr);
print_paths_to_root_1 (ctx, referrer, level + 1);
}
}