diff options
author | Dave Beckett <dave@dajobe.org> | 2008-08-29 21:24:39 +0000 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2008-08-29 21:24:39 +0000 |
commit | ab14c85590cd5afbc89a323ac5f9339c2d35badb (patch) | |
tree | 7df987801d0ccb0241ef4916db06ff1c64282937 /src/raptor_librdfa.c | |
parent | f0e78830fd759d2b9f387617564881e4ed90e22f (diff) | |
download | raptor-ab14c85590cd5afbc89a323ac5f9339c2d35badb.tar.gz |
(raptor_librdfa_parse_recognise_syntax): Use raptor_memstr to compare
a string against a buffer that may not be NUL terminated.
Diffstat (limited to 'src/raptor_librdfa.c')
-rw-r--r-- | src/raptor_librdfa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/raptor_librdfa.c b/src/raptor_librdfa.c index 67b030a5..9514c171 100644 --- a/src/raptor_librdfa.c +++ b/src/raptor_librdfa.c @@ -256,8 +256,8 @@ raptor_librdfa_parse_recognise_syntax(raptor_parser_factory* factory, } if(buffer && len) { -#define HAS_RDFA_1 (strstr((const char*)buffer, "-//W3C//DTD XHTML+RDFa 1.0//EN") != NULL) -#define HAS_RDFA_2 (strstr((const char*)buffer, "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd") != NULL) +#define HAS_RDFA_1 (raptor_memstr((const char*)buffer, len, "-//W3C//DTD XHTML+RDFa 1.0//EN") != NULL) +#define HAS_RDFA_2 (raptor_memstr((const char*)buffer, len, "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd") != NULL) if(HAS_RDFA_1 || HAS_RDFA_2) score=10; |