| 635 | if ((buf == NULL) || (buf->error)) |
| 636 | return(0); |
| 637 | CHECK_COMPAT(buf) |
| 638 | |
| 639 | if (buf->alloc == XML_BUFFER_ALLOC_BOUNDED) { |
| 640 | /* |
| 641 | * Used to provide parsing limits |
| 642 | */ |
| 643 | if (size >= XML_MAX_TEXT_LENGTH) { |
| 644 | xmlBufMemoryError(buf); |
| 645 | return(0); |
| 646 | } |
| 647 | } |
| 648 | |
| 649 | /* Don't resize if we don't have to */ |
| 650 | if (size < buf->size) |
nothing calls this directly
no test coverage detected