diff options
| author | Keith Randall <khr@golang.org> | 2023-03-30 09:52:39 -0700 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2023-03-31 23:25:07 +0000 |
| commit | 8edcdddb23c6d3f786b465c43b49e8d9a0015082 (patch) | |
| tree | 11761613a7090af1e81fefd279f9be9eb7d5afd6 /src/runtime | |
| parent | 012297a862627e236e4d693476a97ffbbf5e27dc (diff) | |
| download | go-8edcdddb23c6d3f786b465c43b49e8d9a0015082.tar.xz | |
crypto/subtle: don't cast to *uintptr when word size is 0
Casting to a *uintptr is not ok if there isn't at least 8 bytes of
data backing that pointer (on 64-bit archs).
So although we end up making a slice of 0 length with that pointer,
the cast itself doesn't know that.
Instead, bail early if the result is going to be 0 length.
Fixes #59334
Change-Id: Id3c0e09d341d838835c0382cccfb0f71dc3dc7e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/480575
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/runtime')
0 files changed, 0 insertions, 0 deletions
