| 8433 | } |
| 8434 | |
| 8435 | static XML_Char * |
| 8436 | copyString(const XML_Char *s, XML_Parser parser) { |
| 8437 | size_t charsRequired = 0; |
| 8438 | XML_Char *result; |
| 8439 | |
| 8440 | /* First determine how long the string is */ |
| 8441 | while (s[charsRequired] != 0) { |
| 8442 | charsRequired++; |
| 8443 | } |
| 8444 | /* Include the terminator */ |
| 8445 | charsRequired++; |
| 8446 | |
| 8447 | /* Now allocate space for the copy */ |
| 8448 | result = MALLOC(parser, charsRequired * sizeof(XML_Char)); |
| 8449 | if (result == NULL) |
| 8450 | return NULL; |
| 8451 | /* Copy the original into place */ |
| 8452 | memcpy(result, s, charsRequired * sizeof(XML_Char)); |
| 8453 | return result; |
| 8454 | } |
| 8455 | |
| 8456 | #if XML_GE == 1 |
| 8457 |
no outgoing calls
no test coverage detected
searching dependent graphs…