From 223876764e14f5494603858e900b790083270a13 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 2 Dec 2015 13:23:53 -0500 Subject: frame: Fix masking error in write-frame. * web/socket/frame.scm (write-frame)[masked-data]: Correctly copy the source bytevector. --- web/socket/frame.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/socket/frame.scm b/web/socket/frame.scm index 0b358ae..82711e4 100644 --- a/web/socket/frame.scm +++ b/web/socket/frame.scm @@ -334,8 +334,7 @@ MASKING-KEY." (uint-list->bytevector (list n) (endianness big) size)) (define (masked-data mask data) - (let* ((length (bytevector-length data)) - (bv (make-bytevector length))) + (let ((bv (bytevector-copy data))) (mask-bytevector! bv mask) bv)) -- cgit v1.2.3