From e81f018ed5c9861bdb2ee4fd0f373608a0c3da9d Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 15 Mar 2016 11:17:11 +0000 Subject: [PATCH] Fix buffer overrun in WSPR encode git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6531 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/wsprd/fano.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/wsprd/fano.c b/lib/wsprd/fano.c index 2e960221c..bf2603a45 100644 --- a/lib/wsprd/fano.c +++ b/lib/wsprd/fano.c @@ -69,7 +69,7 @@ int encode( int i; encstate = 0; - while(nbytes-- != 0) { + while(--nbytes != 0) { for(i=7;i>=0;i--) { encstate = (encstate << 1) | ((*data >> i) & 1); ENCODE(sym,encstate);