X-Git-Url: http://git.hcoop.net/bpt/emacs.git/blobdiff_plain/d8ad4d3ff9dcea9c581d72e1e9ec292ea18673b1..51721edc6ba92f9c7cb6a2daab45bb538a696f3d:/src/doprnt.c diff --git a/src/doprnt.c b/src/doprnt.c index 8cab219aaf..3d50724ae2 100644 --- a/src/doprnt.c +++ b/src/doprnt.c @@ -1,7 +1,7 @@ /* Output like sprintf to a buffer of specified size. Also takes args differently: pass one pointer to the end of the format string in addition to the format string itself. - Copyright (C) 1985, 2001-2012 Free Software Foundation, Inc. + Copyright (C) 1985, 2001-2014 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -38,7 +38,7 @@ along with GNU Emacs. If not, see . */ could include embedded null characters. . It signals an error if the length of the formatted string is about to - overflow MOST_POSITIVE_FIXNUM, to avoid producing strings longer than what + overflow ptrdiff_t or size_t, to avoid producing strings longer than what Emacs can handle. OTOH, this function supports only a small subset of the standard C formatted @@ -250,7 +250,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format, { if (big_buffer) xfree (big_buffer); - big_buffer = xmalloc (size_bound); + big_buffer = xmalloc_atomic (size_bound); sprintf_buffer = big_buffer; size_allocated = size_bound; }