| 220 | */ |
| 221 | |
| 222 | int |
| 223 | xmlStrncmp(const xmlChar *str1, const xmlChar *str2, int len) { |
| 224 | if (len <= 0) return(0); |
| 225 | if (str1 == str2) return(0); |
| 226 | if (str1 == NULL) return(-1); |
| 227 | if (str2 == NULL) return(1); |
| 228 | #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION |
| 229 | return(strncmp((const char *)str1, (const char *)str2, len)); |
| 230 | #else |
| 231 | do { |
| 232 | int tmp = *str1++ - *str2; |
| 233 | if (tmp != 0 || --len == 0) return(tmp); |
| 234 | } while (*str2++ != 0); |
| 235 | return 0; |
| 236 | #endif |
| 237 | } |
| 238 | |
| 239 | static const xmlChar casemap[256] = { |
| 240 | 0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07, |
no outgoing calls
no test coverage detected