diff options
author | Dave Beckett <dave@dajobe.org> | 2014-04-18 17:40:26 -0700 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2014-04-18 17:40:26 -0700 |
commit | 8939d80a6f0af8796131a1de060972474bd12773 (patch) | |
tree | 9b1dc75173b6af34d9e4a81e1098e401d8332bc2 /librdfa/triple.c | |
parent | d5c7e452ced985ebf34a5dfd45ed1910bfa41e14 (diff) | |
download | raptor-8939d80a6f0af8796131a1de060972474bd12773.tar.gz |
(rdfa_complete_object_literal_triples) strchr on NULL [coverity CID 29429]
(rdfa_complete_object_literal_triples): Need non NULL
context->xml_literal to do strchr() on it [coverity CID 29429]
Diffstat (limited to 'librdfa/triple.c')
-rw-r--r-- | librdfa/triple.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/librdfa/triple.c b/librdfa/triple.c index 3ad20504..43c0065d 100644 --- a/librdfa/triple.c +++ b/librdfa/triple.c @@ -593,7 +593,8 @@ void rdfa_complete_object_literal_triples(rdfacontext* context) * serializing to text, all nodes that are descendants of the * [current element], i.e., not including the element itself, and * giving it a datatype of rdf:XMLLiteral. */ - if((current_object_literal == NULL) && + if((context->xml_literal != NULL) && + (current_object_literal == NULL) && (strchr(context->xml_literal, '<') != NULL) && ((context->datatype == NULL) || (strcmp(context->datatype, |