The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=e9bfb50d5e7aa5d673a5a35318820320c4190d33

commit e9bfb50d5e7aa5d673a5a35318820320c4190d33
Author:     Mark Johnston <[email protected]>
AuthorDate: 2021-10-29 18:25:42 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2021-10-29 18:29:50 +0000

    sort: Fix random sort
    
    bwsrawdata() is supposed to return the string buffer.
    
    PR:             259451
    Reported by:    [email protected]
    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)

Reply via email to