git: e9bfb50d5e7a - main - sort: Fix random sort
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 29 Oct 2021 18:31:31 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=e9bfb50d5e7aa5d673a5a35318820320c4190d33
commit e9bfb50d5e7aa5d673a5a35318820320c4190d33
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-10-29 18:25:42 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-10-29 18:29:50 +0000
sort: Fix random sort
bwsrawdata() is supposed to return the string buffer.
PR: 259451
Reported by: sigsys@gmail.com
Fixes: d053fb22f6d3 ("usr.bin/sort: Avoid UBSan errors")
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
---
usr.bin/sort/bwstring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/usr.bin/sort/bwstring.c b/usr.bin/sort/bwstring.c
index c31cb859cb37..2f2737e94314 100644
--- a/usr.bin/sort/bwstring.c
+++ b/usr.bin/sort/bwstring.c
@@ -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)