Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ext/dom/serialize_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@
#include <Zend/zend_types.h>
#include <libxml/tree.h>

/* The lengths are merely here for optimization purposes, this cannot be used to compare substrings. */
static zend_always_inline bool dom_local_name_compare_ex(const xmlNode *node, const char *tag, size_t tag_length, size_t name_length)
{
return name_length == tag_length && zend_binary_strcmp((const char *) node->name, name_length, tag, tag_length) == 0;
return name_length == tag_length && memcmp((const char *) node->name, tag, name_length + 1) == 0;
}

#endif
Loading