mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-23 05:58:43 -05: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
a94b4f775e
commit
875339fabe
@ -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