diff options
author | Alex Cherepanov <alex.cherepanov@artifex.com> | 2009-12-29 22:18:01 +0000 |
---|---|---|
committer | Alex Cherepanov <alex.cherepanov@artifex.com> | 2009-12-29 22:18:01 +0000 |
commit | ef2bb76d188d0f52b4131f7b7b351f602bb4399b (patch) | |
tree | 052cb8270a3a4aa5bc4a49b0ac6607cfdab4ab74 /gs/base/stdio_.h | |
parent | f9d7f47169d57f4598ef0a79c0b4563effda8d16 (diff) |
Use safer function vsnprintf() instead of vsprintf() for error reporting.
Truncate long messages, issue a warning, and continue. Bug 690829.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@10568 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/base/stdio_.h')
-rw-r--r-- | gs/base/stdio_.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gs/base/stdio_.h b/gs/base/stdio_.h index 320182005..3d335a8e3 100644 --- a/gs/base/stdio_.h +++ b/gs/base/stdio_.h @@ -68,6 +68,9 @@ int unlink(const char *); #if defined(_MSC_VER) # define fdopen(handle,mode) _fdopen(handle,mode) # define fileno(file) _fileno(file) +# if _MSC_VER < 1500 /* VS 2008 has vsnprintf */ +# define vsnprintf _vsnprintf +# endif /* Microsoft Visual C++ 2005 doesn't properly define snprintf */ int snprintf(char *buffer, size_t count, const char *format , ...); #endif |