Skip zero-length subfields when decoding ISO2709. This rare case happens
if a record has two FS characters in a sequence. Without this patch
there would be a reference beyond char array in using_code_len fragments
in marcdisp.c.
buf[i] != ISO2709_RS && buf[i] != ISO2709_IDFS &&
buf[i] != ISO2709_FS)
i++;
- yaz_marc_add_subfield(mt, buf+code_offset, i - code_offset);
+ if (i > code_offset)
+ yaz_marc_add_subfield(mt, buf+code_offset, i - code_offset);
}
}
else