diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2023-03-02 20:26:01 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2023-03-03 13:24:47 +0000 |
commit | dfa956575b0fcd688d7b50050683cf1d07045011 (patch) | |
tree | fa52c8d5bc2fbbf9df18c94886a6f260ff4e922a /devices/vector/doc_common.c | |
parent | 45a4a190b9618944c746886e902493e4fd0cc87d (diff) | |
download | ghostpdl-dfa956575b0fcd688d7b50050683cf1d07045011.tar.gz |
Fix size_t -> int overflow in cmd_get_buffer_space.
When asking for the free space available, we have to be careful
when returning what might be a size_t in an int. In particular
this causes problems with 3G bufferspaces resulting in errors
as the value they return becomes a negative int.
The fix here is to clip the available buffer space at INT_MAX.
This is fine, but reworking the code to use an explicit
size_t return would probably be better eventually.
Diffstat (limited to 'devices/vector/doc_common.c')
0 files changed, 0 insertions, 0 deletions