diff options
author | Julian Smith <jules@op59.net> | 2020-02-10 16:11:06 +0000 |
---|---|---|
committer | Julian Smith <jules@op59.net> | 2020-02-10 16:47:26 +0000 |
commit | c736329f36c2258011162c97eec59818fb6f147e (patch) | |
tree | a8bf29ea16aa145682535792efcfe07bd6c7ea11 /gpdl | |
parent | f1cb9e832424a1185fe081e2238b2ba42f805318 (diff) | |
download | ghostpdl-c736329f36c2258011162c97eec59818fb6f147e.tar.gz |
Fixed segv after alloc failure in ps_impl_allocate_interp_instance() (found by memento).
Fixes:
MEMENTO_FAILAT=2017 LD_LIBRARY_PATH=../libbacktrace/.libs ./membin/gpdl -sDEVICE=bit -o /dev/null examples/tiger.eps
Diffstat (limited to 'gpdl')
-rw-r--r-- | gpdl/psitop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gpdl/psitop.c b/gpdl/psitop.c index 0ba3c01e2..937bf9932 100644 --- a/gpdl/psitop.c +++ b/gpdl/psitop.c @@ -347,8 +347,10 @@ ps_impl_allocate_interp_instance(pl_interp_implementation_t *impl, gs_memory_t * psi->bytes_fed = 0; psi->psapi_instance = gs_lib_ctx_get_interp_instance(mem); code = psapi_new_instance(&psi->psapi_instance, NULL); - if (code < 0) + if (code < 0) { gs_free_object(mem, psi, "ps_impl_allocate_interp_instance"); + return code; + } impl->interp_client_data = psi; |