Lucene: limit and offset are summed together without validation which can cause an integer overflow

Bug #728325 reported by Vesa Marttila on 2011-03-03
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Querydsl
Fix Released
Low
Vesa Marttila

Bug Description

The negative value is then passed to Lucene which throws a NegativeArraySizeException. It would be better to validate the input in AbstractLuceneQuery and then throw an IllegalArgumentException with a descriptive error message, such as "The given limit (" + limit + ") and offset (" + offset + ") cause an integer overflow."

Vesa Marttila (ponzao) on 2011-03-03
Changed in querydsl:
assignee: nobody → Vesa Marttila (ponzao)
importance: Undecided → Low
Vesa Marttila (ponzao) wrote :

Fixed by throwing a QueryException if the sum of limit and offset is negative.

Changed in querydsl:
status: New → Fix Committed

Released in 2.2.0-beta1

Changed in querydsl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers