Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8ab8be21 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

floss: Limit str::from_utf8 to null-terminated slice

bt_bdname_t->name has the type [u8; 249] and str::from_utf8 attempts to
convert the entire slice instead of just the null-terminated string
portion. Modify the string conversion for bt_bdname_t so that it first
gets the null-terminated slice and attempts str::from_utf8 on that only.

Bug: 194380291
Tag: #floss
Test: Rust unit tests
Change-Id: I7147925ff05b7a00e96bc71de833236f62e9da6a
parent 91e53d2e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment