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:
Mark Johnston 2021-10-29 14:25:42 -04:00
parent 74e9b5f29a
commit e9bfb50d5e

View File

@ -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)