You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
228: godot-core: bug: fix UB in GodotString::chars_(un)checked r=Bromeon a=gg-yb
`slice::from_raw_parts` requires its first argument to be non-null, even when `len == 0` [1], resulting in a crash on the expect in `chars_checked` when Godot returns an empty GodotString as a null pointer and a length of 0.
I only checked these two usages, but might be worth checking other usages, too.
[1] https://doc.rust-lang.org/std/slice/fn.from_raw_parts.html
Co-authored-by: Yannick Bühler <[email protected]>
0 commit comments