Skip to content
  • Daniel Vrátil's avatar
    Create AgePostingSource on heap · 1e70d63a
    Daniel Vrátil authored
    There was an undocumented behaviour change in Xapian 1.4 where
    Xapian::Query() no longer internally creates a clone of the
    PostingResource that we pass to it and instead takes a (shared)
    ownership of the pointer that is then re-used later while
    the actual query is being executed, which means that the
    PostingResource must live at least until the query execution
    is finished.
    
    We were creating the AgePostingSource on stack, which lead to
    use-after-free in Xapian 1.4.
    
    BUG: 363741
    FIXED-IN: 5.3.2
    1e70d63a