Backport fix of CVE-2024-24576 See https://blog.rust-lang.org/2024/04/09/cve-2024-24576.html r? `@ghost`