projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Refactor getting subfield length to separate function.
[yaz-moved-to-github.git]
/
src
/
utf8.c
diff --git
a/src/utf8.c
b/src/utf8.c
index
bf92cd3
..
8c28d3a
100644
(file)
--- a/
src/utf8.c
+++ b/
src/utf8.c
@@
-22,7
+22,7
@@
static size_t init_utf8(yaz_iconv_t cd, yaz_iconv_decoder_t d,
unsigned char *inp,
size_t inbytesleft, size_t *no_read)
{
unsigned char *inp,
size_t inbytesleft, size_t *no_read)
{
- if (inp[0] != 0xef)
+ if (!inp || inp[0] != 0xef)
{
*no_read = 0;
return 0;
{
*no_read = 0;
return 0;