[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_5 updated. 0234c59782c9a552a3afd6f328d006fe73de7e18

Evergreen Git git at git.evergreen-ils.org
Thu Sep 18 16:18:11 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_2_5 has been updated
       via  0234c59782c9a552a3afd6f328d006fe73de7e18 (commit)
      from  6b88d915d068b00fc8fb1d192cb0077b1e7b212a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0234c59782c9a552a3afd6f328d006fe73de7e18
Author: Galen Charlton <gmc at esilibrary.com>
Date:   Tue Aug 19 13:19:20 2014 -0700

    LP#1358916: refuse to retrieve over-large MARC records via Z39.50
    
    At least one malformed record discovered in the wild can
    cause open-ils.search backends to balloon to over 3G of memory
    consumption.  This patch works around that by refusing
    to process any (MARC) Z39.50 results that are larger than the
    MARC record maximum of 99,999 octets.
    
    Signed-off-by: Galen Charlton <gmc at esilibrary.com>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm
index c830844..a5a4f6c 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm
@@ -462,7 +462,13 @@ sub process_results {
             my $rec = $results->record($_);
 
             if ($tformat eq 'usmarc') {
-                $marc = MARC::Record->new_from_usmarc($rec->raw());
+                my $raw = $rec->raw();
+                if (length($raw) <= 99999) {
+                    $marc = MARC::Record->new_from_usmarc($raw);
+                } else {
+                    $marcs = '';
+                    die "ISO2709 record is too large to process";
+                }
             } elsif ($tformat eq 'xml') {
                 $marc = MARC::Record->new_from_xml($rec->raw());
             } else {

-----------------------------------------------------------------------

Summary of changes:
 .../lib/OpenILS/Application/Search/Z3950.pm        |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list