vendor: Update calmh/xdr to avoid unexpected string behavior (fixes #2882)
This commit is contained in:
parent
c6a67bd203
commit
8044522691
12
vendor/github.com/calmh/xdr/unmarshal.go
generated
vendored
12
vendor/github.com/calmh/xdr/unmarshal.go
generated
vendored
@ -4,11 +4,7 @@
|
|||||||
|
|
||||||
package xdr
|
package xdr
|
||||||
|
|
||||||
import (
|
import "io"
|
||||||
"io"
|
|
||||||
"reflect"
|
|
||||||
"unsafe"
|
|
||||||
)
|
|
||||||
|
|
||||||
type Unmarshaller struct {
|
type Unmarshaller struct {
|
||||||
Error error
|
Error error
|
||||||
@ -40,11 +36,7 @@ func (u *Unmarshaller) UnmarshalStringMax(max int) string {
|
|||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
var v string
|
return string(buf)
|
||||||
p := (*reflect.StringHeader)(unsafe.Pointer(&v))
|
|
||||||
p.Data = uintptr(unsafe.Pointer(&buf[0]))
|
|
||||||
p.Len = len(buf)
|
|
||||||
return v
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (u *Unmarshaller) UnmarshalBytes() []byte {
|
func (u *Unmarshaller) UnmarshalBytes() []byte {
|
||||||
|
|||||||
2
vendor/manifest
vendored
2
vendor/manifest
vendored
@ -22,7 +22,7 @@
|
|||||||
{
|
{
|
||||||
"importpath": "github.com/calmh/xdr",
|
"importpath": "github.com/calmh/xdr",
|
||||||
"repository": "https://github.com/calmh/xdr",
|
"repository": "https://github.com/calmh/xdr",
|
||||||
"revision": "b6e0c321c9b5b28ba5ee21e828323e4b982c6976",
|
"revision": "f9b9f8f7aa27725f5cabb699bd9099ca7ce09143",
|
||||||
"branch": "master"
|
"branch": "master"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user