mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-23 12:38:53 -04:00
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
This commit is contained in:
parent
470547537d
commit
e81f018ed5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user