projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
675adde
)
Fix yaz-marcdump segfault YAZ-801
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 3 Dec 2014 16:34:43 +0000
(17:34 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 3 Dec 2014 16:34:43 +0000
(17:34 +0100)
src/marcdisp.c
patch
|
blob
|
history
diff --git
a/src/marcdisp.c
b/src/marcdisp.c
index
85acb07
..
f03d70f
100644
(file)
--- a/
src/marcdisp.c
+++ b/
src/marcdisp.c
@@
-1468,7
+1468,7
@@
void yaz_marc_write_using_libxml2(yaz_marc_t mt, int enable)
int yaz_marc_check_marc21_coding(const char *charset,
const char *marc_buf, int sz)
{
- if ((!yaz_matchstr(charset, "MARC8?") ||
+ if (charset && (!yaz_matchstr(charset, "MARC8?") ||
!yaz_matchstr(charset, "MARC8")) && marc_buf && sz > 25
&& marc_buf[9] == 'a')
return 1;