mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
sort: Fix random sort
bwsrawdata() is supposed to return the string buffer.
PR: 259451
Reported by: sigsys@gmail.com
Fixes: d053fb22f6
("usr.bin/sort: Avoid UBSan errors")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
74e9b5f29a
commit
e9bfb50d5e
|
@ -152,7 +152,7 @@ bwsprintf(FILE *f, struct bwstring *bws, const char *prefix, const char *suffix)
|
|||
const void* bwsrawdata(const struct bwstring *bws)
|
||||
{
|
||||
|
||||
return (&(bws->wdata));
|
||||
return (bws->wdata.str);
|
||||
}
|
||||
|
||||
size_t bwsrawlen(const struct bwstring *bws)
|
||||
|
|
Loading…
Reference in a new issue