T Mohan Aditya
752b24976c
fix: avoid page offset overflow in PaginateSlice and ListOptions ( #40572 )
...
A huge `page` value made `(page-1)*pageSize` wrap to a negative int.
`PaginateSlice` then panicked with a slice-bounds error (e.g. the cron
and tags APIs), and `ListOptions.GetSkipTake` caused an index panic in
the pull request commits and files APIs. `PaginateSlice` now compares
the page against `len(list)/pageSize`, and `ListOptions` caps the page
so the offset stays in range.
---------
Co-authored-by: silverwind <me@silverwind.io >
2026-11-30 08:38:54 +00:00
..
2026-10-24 13:48:19 +00:00
2026-11-06 20:45:17 +00:00
2026-01-27 11:57:20 -08:00
2026-08-27 15:31:20 +00:00
2026-08-27 15:31:20 +00:00
2026-08-06 08:41:40 +02:00
2026-08-06 08:41:40 +02:00
2026-10-24 13:48:19 +00:00
2026-11-10 16:29:36 +00:00
2026-11-10 16:29:36 +00:00
2026-07-23 14:31:29 +00:00
2026-10-06 08:22:36 +00:00
2022-11-27 18:20:29 +00:00
2022-11-27 18:20:29 +00:00
2022-11-27 18:20:29 +00:00
2026-08-02 12:22:07 +08:00
2026-08-02 12:22:07 +08:00
2026-10-24 13:48:19 +00:00
2026-11-12 06:19:10 +00:00
2026-10-24 13:48:19 +00:00
2024-06-11 18:47:45 +00:00
2025-02-21 00:05:40 +08:00
2022-11-27 18:20:29 +00:00
2023-01-14 23:57:10 +08:00
2023-07-04 18:36:08 +00:00
2026-11-30 08:38:54 +00:00
2026-11-30 08:38:54 +00:00
2026-10-24 13:48:19 +00:00
2026-10-22 13:06:01 +00:00
2026-07-28 17:04:22 +00:00
2026-10-06 08:22:36 +00:00
2026-04-28 23:26:08 +08:00
2026-04-28 23:26:08 +08:00
2025-03-31 01:53:48 -04:00
2025-02-03 01:51:12 +08:00
2026-10-01 04:01:16 +00:00
2026-10-01 04:01:16 +00:00
2026-10-24 13:48:19 +00:00
2026-11-05 15:19:09 +00:00
2024-12-26 00:33:55 +08:00
2026-09-30 16:37:30 +00:00
2026-10-24 13:48:19 +00:00
2026-07-12 11:33:14 +00:00
2026-07-12 13:38:34 +00:00
2026-07-12 13:38:34 +00:00
2026-03-31 16:22:23 +00:00
2023-05-08 19:49:59 +08:00
2026-07-23 08:29:28 +00:00
2026-07-23 08:29:28 +00:00
2026-11-07 11:15:28 +00:00
2026-11-07 11:15:28 +00:00
2026-03-09 02:30:54 +08:00
2026-10-24 13:48:19 +00:00
2026-10-02 21:08:14 +02:00