From 4e8083ec81106eedbecb12799823044dbd05bc7e Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 20 Jun 2019 00:05:28 -0700 Subject: [PATCH] Fix arbitrary INT_MAX limit on referrer repr MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * src/pdumper.c (print_paths_to_root_1): Don’t assume strlen (repr) < INT_MAX. --- src/pdumper.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pdumper.c b/src/pdumper.c index a028600ea79..c00f8a0af54 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -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); } } -- 2.39.2