diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-05-11 00:57:18 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-05-11 10:40:55 +0100 |
commit | 4f03b3f51957fcaab6b953ba79bb32d2096ad49b (patch) | |
tree | 486300e61f7c71d5fbaafe8f6d26a85e402445e1 /devices/gdevdm24.c | |
parent | 4c305cb14b76bebfe0e147bcd90f4cc2ec7482ac (diff) | |
download | ghostpdl-4f03b3f51957fcaab6b953ba79bb32d2096ad49b.tar.gz |
lgtm.com fixes: Avoid narrow mult cast to longer type.
Avoid masking overflows through relying on implicit casting.
Diffstat (limited to 'devices/gdevdm24.c')
-rw-r--r-- | devices/gdevdm24.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/devices/gdevdm24.c b/devices/gdevdm24.c index 9392f4bf0..42706eee7 100644 --- a/devices/gdevdm24.c +++ b/devices/gdevdm24.c @@ -150,7 +150,7 @@ dot24_print_page (gx_device_printer *pdev, gp_file *prn_stream, char *init_strin if (code == 0) { /* Pad with lines of zeros. */ - memset (inp, 0, (24 - lcnt) * line_size); + memset (inp, 0, (size_t)(24 - lcnt) * line_size); break; } } @@ -162,7 +162,7 @@ dot24_print_page (gx_device_printer *pdev, gp_file *prn_stream, char *init_strin if (code == 0) { /* Pad with lines of zeros. */ - memset (inp, 0, (24 - lcnt) * line_size); + memset (inp, 0, (size_t)(24 - lcnt) * line_size); break; } } |