Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • L libxml2
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 90
    • Issues 90
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 6
    • Merge requests 6
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GNOMEGNOME
  • libxml2
  • Merge requests
  • !183

Reserve byte for NUL terminator and report errors consistently in xmlBuf and xmlBuffer

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged David Kilzer requested to merge ddkilzer/reserve-NUL-termiantor-and-report-errors-consistently-in-xmlBuf-xmlBuffer into master May 30, 2022
  • Overview 8
  • Commits 1
  • Pipelines 5
  • Changes 2

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().
Edited Jun 07, 2022 by David Kilzer
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: ddkilzer/reserve-NUL-termiantor-and-report-errors-consistently-in-xmlBuf-xmlBuffer