From dfa978b1af9654b2ade99ace9fb905082443488a Mon Sep 17 00:00:00 2001 From: Bernd Schoolmann Date: Mon, 29 Apr 2024 19:49:57 +0200 Subject: [PATCH] Fix browser biometrics integration --- browserbiometrics/communication.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browserbiometrics/communication.go b/browserbiometrics/communication.go index f615054..4e5582c 100644 --- a/browserbiometrics/communication.go +++ b/browserbiometrics/communication.go @@ -43,13 +43,13 @@ func writeMessageLength(msg []byte) error { } func readMessageLength(msg []byte) (int, error) { - var length int + var length int32 buf := bytes.NewBuffer(msg) err := binary.Read(buf, nativeEndian, &length) if err != nil { return 0, fmt.Errorf("Unable to read bytes representing message length: %w", err) } - return length, nil + return int(length), nil } func send(msg SendMessage) error {