Skip to content
Snippets Groups Projects
  • Arseny Kapoulkine's avatar
    79fb68ac
    Use a null-terminated buffer for parsing as often as possible. · 79fb68ac
    Arseny Kapoulkine authored
    Parsing used to work on a non null-terminated buffer, inserting a fake null terminator to increase performance.
    This makes it impossible to implement fragment parsing that preserves PCDATA contents (as witnessed by some
    tests for boundary conditions that actually depended on this behavior).
    
    Since almost all uses result in us allocating an internal buffer anyway, the new policy is to make sure all buffers
    that are allocated by pugixml are null-terminated - the only exception now is external calls to load_buffer_inplace
    that don't trigger encoding conversion.
    
    git-svn-id: https://pugixml.googlecode.com/svn/trunk@977 99668b35-9821-0410-8761-19e4c4f06640
    79fb68ac
    History
    Use a null-terminated buffer for parsing as often as possible.
    Arseny Kapoulkine authored
    Parsing used to work on a non null-terminated buffer, inserting a fake null terminator to increase performance.
    This makes it impossible to implement fragment parsing that preserves PCDATA contents (as witnessed by some
    tests for boundary conditions that actually depended on this behavior).
    
    Since almost all uses result in us allocating an internal buffer anyway, the new policy is to make sure all buffers
    that are allocated by pugixml are null-terminated - the only exception now is external calls to load_buffer_inplace
    that don't trigger encoding conversion.
    
    git-svn-id: https://pugixml.googlecode.com/svn/trunk@977 99668b35-9821-0410-8761-19e4c4f06640
Code owners
Assign users and groups as approvers for specific file changes. Learn more.