Skip to content
Snippets Groups Projects
Select Git revision
0 results

buf.c

  • David Kilzer's avatar
    b6e7f5dd8f90
    Reserve byte for NUL terminator and report errors consistently in xmlBuf and xmlBuffer · b6e7f5dd8f90
    David Kilzer authored
    This is a follow-up to commit 6c283d83.
    
    * buf.c:
    (xmlBufGrowInternal):
    - Call xmlBufMemoryError() when the buffer size would overflow.
    - Account for NUL terminator byte when using XML_MAX_TEXT_LENGTH.
    - Do not include NUL terminator byte when returning length.
    (xmlBufAdd):
    - Call xmlBufMemoryError() when the buffer size would overflow.
    
    * tree.c:
    (xmlBufferGrow):
    - Call xmlTreeErrMemory() when the buffer size would overflow.
    - Do not include NUL terminator byte when returning length.
    (xmlBufferResize):
    - Update error message in xmlTreeErrMemory() to be consistent
      with other similar messages.
    (xmlBufferAdd):
    - Call xmlTreeErrMemory() when the buffer size would overflow.
    (xmlBufferAddHead):
    - Add overflow checks similar to those in xmlBufferAdd().
    b6e7f5dd8f90
    History
    Reserve byte for NUL terminator and report errors consistently in xmlBuf and xmlBuffer
    David Kilzer authored
    This is a follow-up to commit 6c283d83.
    
    * buf.c:
    (xmlBufGrowInternal):
    - Call xmlBufMemoryError() when the buffer size would overflow.
    - Account for NUL terminator byte when using XML_MAX_TEXT_LENGTH.
    - Do not include NUL terminator byte when returning length.
    (xmlBufAdd):
    - Call xmlBufMemoryError() when the buffer size would overflow.
    
    * tree.c:
    (xmlBufferGrow):
    - Call xmlTreeErrMemory() when the buffer size would overflow.
    - Do not include NUL terminator byte when returning length.
    (xmlBufferResize):
    - Update error message in xmlTreeErrMemory() to be consistent
      with other similar messages.
    (xmlBufferAdd):
    - Call xmlTreeErrMemory() when the buffer size would overflow.
    (xmlBufferAddHead):
    - Add overflow checks similar to those in xmlBufferAdd().