X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=util%2Fmarcdisp.c;h=723026ff708373f790ad812c46b1c82831567a46;hb=fc2093cfd23eda0ee8384b18dc7e7b8adffd073a;hp=8ed80e325883531ad96398813e0324c408edae4b;hpb=191f86396f357a0d26df67ce6b7d9ccb23f3e207;p=yaz-moved-to-github.git diff --git a/util/marcdisp.c b/util/marcdisp.c index 8ed80e3..723026f 100644 --- a/util/marcdisp.c +++ b/util/marcdisp.c @@ -4,7 +4,13 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: marcdisp.c,v $ - * Revision 1.7 1997-09-24 13:29:40 adam + * Revision 1.9 1999-12-21 16:24:48 adam + * More robust ISO2709 handling (in case of real bad formats). + * + * Revision 1.8 1999/11/30 13:47:12 adam + * Improved installation. Moved header files to include/yaz. + * + * Revision 1.7 1997/09/24 13:29:40 adam * Added verbose option -v to marcdump utility. * * Revision 1.6 1997/09/04 07:52:27 adam @@ -30,8 +36,8 @@ #include #include #include -#include -#include +#include +#include int marc_display_ex (const char *buf, FILE *outf, int debug) { @@ -70,7 +76,11 @@ int marc_display_ex (const char *buf, FILE *outf, int debug) fprintf (outf, "Length implementation %5d\n", length_implementation); } for (entry_p = 24; buf[entry_p] != ISO2709_FS; ) + { entry_p += 3+length_data_entry+length_starting; + if (entry_p >= record_length) + return -1; + } base_address = entry_p+1; for (entry_p = 24; buf[entry_p] != ISO2709_FS; ) {