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

Bug #728325 reported by Vesa Marttila
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)
Changed in querydsl:
assignee: nobody → Vesa Marttila (ponzao)
importance: Undecided → Low
Revision history for this message
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
Revision history for this message
Timo Westkämper (timo-westkamper) wrote :

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.