Skip to content

Commit

Permalink
fix(xrefs_filter): properly merge page lists that represent allPages (#…
Browse files Browse the repository at this point in the history
…5624)

Previously, uint32max, which represents the set of all pages, was being merged into the list of page indices and later used as an array index, which was out of bounds.
  • Loading branch information
justbuchanan committed May 9, 2023
1 parent 185f8e1 commit 6fe9ba3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions kythe/go/serving/xrefs/xrefs_filter.go
Expand Up @@ -261,6 +261,9 @@ func postingAnd(idx postings, list []uint32, trigram uint32) []uint32 {
}

func mergeOr(l1, l2 []uint32) []uint32 {
if isAllPages(l1) || isAllPages(l2) {
return allPages
}
var l []uint32
var i, j int
for i < len(l1) || j < len(l2) {
Expand Down

0 comments on commit 6fe9ba3

Please sign in to comment.