Permalink
Browse files

changed malloc to mymalloc in error.c and Added reading from scalars …

…for all

formats that support iolayer.
  • Loading branch information...
1 parent 4dfa552 commit a6c47345e86b541cf380919eedd22c0747b93b4f Arnar Mar Hrafnkelsson committed Oct 31, 2001
Showing with 2 additions and 2 deletions.
  1. +1 −1 Imager.pm
  2. +1 −1 error.c
View
@@ -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 );
View
@@ -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);

0 comments on commit a6c4734

Please sign in to comment.