From: Paul Eggert Date: Thu, 20 Jun 2019 07:05:28 +0000 (-0700) Subject: Fix arbitrary INT_MAX limit on referrer repr X-Git-Tag: emacs-27.0.90~2373 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=4e8083ec81106eedbecb12799823044dbd05bc7e;p=emacs.git Fix arbitrary INT_MAX limit on referrer repr * src/pdumper.c (print_paths_to_root_1): Don’t assume strlen (repr) < INT_MAX. --- 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); } }