From: Marc Cromme Date: Tue, 24 Apr 2007 22:19:19 +0000 (+0000) Subject: protected from dereferencing of empty pointer X-Git-Tag: PAZPAR2.1.0.0~215 X-Git-Url: http://git.indexdata.com/?a=commitdiff_plain;h=096819eed21ab001d0c96dc6653f183ca0bd47a7;p=pazpar2-moved-to-github.git protected from dereferencing of empty pointer --- diff --git a/src/record.c b/src/record.c index 016cf24..2ad01d2 100644 --- a/src/record.c +++ b/src/record.c @@ -1,4 +1,4 @@ -/* $Id: record.c,v 1.5 2007-04-24 22:17:05 marc Exp $ +/* $Id: record.c,v 1.6 2007-04-24 22:19:19 marc Exp $ Copyright (c) 2006-2007, Index Data. This file is part of Pazpar2. @@ -19,7 +19,7 @@ Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/* $Id: record.c,v 1.5 2007-04-24 22:17:05 marc Exp $ */ +/* $Id: record.c,v 1.6 2007-04-24 22:19:19 marc Exp $ */ #include @@ -43,6 +43,9 @@ union data_types * data_types_assign(NMEM nmem, { // assert(nmem); + if (!data1) + return 0; + if (!*data1){ if (!nmem) return 0;