Skip to content
  • Kevin J. McCarthy's avatar
    Ensure a resized empty buffer is null-terminated. · 42481bda
    Kevin J. McCarthy authored
    The new buffer code is using the pool, which ensures its buffers are
    null-terminated.
    
    However, if a "new" buffer from another part of the code were passed
    to one of the temporary interfaces that resizes the buffer, it's
    possible a non-terminated string might end up being passed through.
    
    It's reasonable to expect mutt_b2s() for a "new" buffer should be the
    same as after it is resized larger.  So ensure the resulting buf->data
    is properly terminated to avoid surprises.
    42481bda