1
1
mirror of https://github.com/go-gitea/gitea.git synced 2026-03-27 09:01:51 +01:00
gitea/modules/charset
silverwind 0724344a8a
Fix CodeQL code scanning alerts (#36858)
Fixes 10 CodeQL code scanning alerts:

- Change `NewPagination`/`SetLinkHeader` to accept `int64` for total
count, clamping internally to fix incorrect-integer-conversion alerts
([#110](https://github.com/go-gitea/gitea/security/code-scanning/110),
[#114](https://github.com/go-gitea/gitea/security/code-scanning/114),
[#115](https://github.com/go-gitea/gitea/security/code-scanning/115),
[#116](https://github.com/go-gitea/gitea/security/code-scanning/116))
- Use `strconv.Atoi()` in `htmlrenderer.go` to avoid int64 intermediate
([#105](https://github.com/go-gitea/gitea/security/code-scanning/105),
[#106](https://github.com/go-gitea/gitea/security/code-scanning/106))
- Clamp regex match indices in `escape_stream.go` to fix
allocation-size-overflow
([#161](https://github.com/go-gitea/gitea/security/code-scanning/161),
[#162](https://github.com/go-gitea/gitea/security/code-scanning/162),
[#163](https://github.com/go-gitea/gitea/security/code-scanning/163))
- Cap slice pre-allocation in `GetIssueDependencies`
([#181](https://github.com/go-gitea/gitea/security/code-scanning/181))

---------

Co-authored-by: Claude (Opus 4.6) <noreply@anthropic.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2026-03-08 14:35:50 +00:00
..
ambiguous Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
invisible Replace interface{} with any (#25686) 2023-07-04 18:36:08 +00:00
ambiguous_gen_test.go Enable testifylint rules (#34075) 2025-03-31 01:53:48 -04:00
ambiguous_gen.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
ambiguous.go Ensure that Chinese punctuation is not ambiguous when locale is Chinese (#22019) 2022-12-04 17:57:30 +00:00
breakwriter_test.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
breakwriter.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
charset_test.go Fix bug when viewing the commit diff page with non-ANSI files (#36149) 2025-12-13 21:54:03 +08:00
charset.go Fix bug when viewing the commit diff page with non-ANSI files (#36149) 2025-12-13 21:54:03 +08:00
escape_status.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
escape_stream.go Fix CodeQL code scanning alerts (#36858) 2026-03-08 14:35:50 +00:00
escape_test.go Render embedded code preview by permlink in markdown (#30234) 2024-04-02 17:48:27 +00:00
escape.go Fix code highlighting on blame page (#36157) 2025-12-14 12:40:55 +02:00
htmlstream.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00
invisible_gen.go Implement FSFE REUSE for golang files (#21840) 2022-11-27 18:20:29 +00:00