From ac5c421c48f4f53eceb80dc86547402fd3c06ed1 Mon Sep 17 00:00:00 2001 From: Tom Thorogood Date: Mon, 31 Dec 2018 02:14:37 +1030 Subject: [PATCH] Use binary.BigEndian.PutUint32 in EDNS0_EXPIRE.pack (#875) --- edns.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/edns.go b/edns.go index f8c60e61..c0e17869 100644 --- a/edns.go +++ b/edns.go @@ -498,10 +498,7 @@ func (e *EDNS0_EXPIRE) String() string { return strconv.FormatUint(uint64(e.Expi func (e *EDNS0_EXPIRE) pack() ([]byte, error) { b := make([]byte, 4) - b[0] = byte(e.Expire >> 24) - b[1] = byte(e.Expire >> 16) - b[2] = byte(e.Expire >> 8) - b[3] = byte(e.Expire) + binary.BigEndian.PutUint32(b, e.Expire) return b, nil }