diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2022-02-17 10:26:29 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2022-02-17 11:26:06 +0000 |
commit | 0a54336c81443ab75c6cb7c01ab7ec4c592edd75 (patch) | |
tree | 83fead97f9fb0525e7b0af2c1f186a700d164953 /devices | |
parent | c45e21b7200e1d8ce38d4306e65e627a3e396193 (diff) | |
download | ghostpdl-0a54336c81443ab75c6cb7c01ab7ec4c592edd75.tar.gz |
Coverity 376143: Fix incorrect buffer size passed to gs_snprintf.
Diffstat (limited to 'devices')
-rw-r--r-- | devices/gdevpdfimg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/devices/gdevpdfimg.c b/devices/gdevpdfimg.c index fe3fcf9da..fd4fd7d2f 100644 --- a/devices/gdevpdfimg.c +++ b/devices/gdevpdfimg.c @@ -707,13 +707,13 @@ static void write_xref_entry (stream *s, gs_offset_t Offset) } static void -pdf_store_default_Producer(char *buf) +pdf_store_default_Producer(char buf[256]) { int major = (int)(gs_revision / 1000); int minor = (int)(gs_revision - (major * 1000)) / 10; int patch = gs_revision % 10; - gs_snprintf(buf, sizeof(buf), "(%s %d.%02d.%d)", gs_product, major, minor, patch); + gs_snprintf(buf, 256, "(%s %d.%02d.%d)", gs_product, major, minor, patch); } static int pdf_image_finish_file(gx_device_pdf_image *pdf_dev, int PCLm) |