From a6c47345e86b541cf380919eedd22c0747b93b4f Mon Sep 17 00:00:00 2001 From: Arnar Mar Hrafnkelsson Date: Wed, 31 Oct 2001 18:12:54 +0000 Subject: [PATCH] changed malloc to mymalloc in error.c and Added reading from scalars for all formats that support iolayer. --- Imager.pm | 2 +- error.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Imager.pm b/Imager.pm index 704c3ebb..ec35857b 100644 --- a/Imager.pm +++ b/Imager.pm @@ -855,7 +855,7 @@ sub read { if ($iolready{$input{'type'}}) { # Setup data source - $IO = io_new_fd($fd); # sort of simple for now eh? + $IO = defined $fd ? io_new_fd($fd) : io_new_buffer($input{data}); if ( $input{'type'} eq 'jpeg' ) { ($self->{IMG},$self->{IPTCRAW})=i_readjpeg_wiol( $IO ); diff --git a/error.c b/error.c index 4e6c0622..dd6b94f3 100644 --- a/error.c +++ b/error.c @@ -297,7 +297,7 @@ int i_failed(int code, char const *msg) { for (sp = error_sp; error_stack[sp].msg; ++sp) { total += strlen(error_stack[sp].msg) + 2; } - full = malloc(total); + full = mymalloc(total); if (!full) { /* just quit, at least it's on stderr */ exit(EXIT_FAILURE); -- 2.39.5