diff options
author | Dave Beckett <dave@dajobe.org> | 2003-07-22 14:09:12 +0000 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2003-07-22 14:09:12 +0000 |
commit | 8e0219f968ed46239559e15a98ef2f895a904992 (patch) | |
tree | a9db4a6077182320c94bb9d77856f122d6d124f7 /src/ntriples_parse.c | |
parent | df2421126400ed28f650572414c80b341caf5901 (diff) | |
download | raptor-8e0219f968ed46239559e15a98ef2f895a904992.tar.gz |
(raptor_ntriples_parse_chunk): Handle just the end marker being given
i.e. len=0 (and possibly s=NULL)
Diffstat (limited to 'src/ntriples_parse.c')
-rw-r--r-- | src/ntriples_parse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ntriples_parse.c b/src/ntriples_parse.c index ea8cc91a..f8953d69 100644 --- a/src/ntriples_parse.c +++ b/src/ntriples_parse.c @@ -778,6 +778,10 @@ raptor_ntriples_parse_chunk(raptor_parser* rdf_parser, RAPTOR_DEBUG2(raptor_ntriples_parse_chunk, "adding %d bytes to line buffer\n", len); #endif + /* No data? It's the end */ + if(!len) + return 0; + buffer=(char*)RAPTOR_MALLOC(cstring, ntriples_parser->line_length + len + 1); if(!buffer) { raptor_parser_fatal_error(rdf_parser, "Out of memory"); |