mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-26 06:08:42 -05:00
Prevent a crash caused by a certain type of false decode. Update copyright date.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@8452 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8d6faa7458
commit
7578126454
@ -713,7 +713,7 @@ void usage(void)
|
|||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
char cr[] = "(C) 2016, Steven Franke - K9AN";
|
char cr[] = "(C) 2018, Steven Franke - K9AN";
|
||||||
(void)cr;
|
(void)cr;
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
extern int optind;
|
extern int optind;
|
||||||
@ -1316,7 +1316,6 @@ int main(int argc, char *argv[])
|
|||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove dupes (same callsign and freq within 3 Hz)
|
// Remove dupes (same callsign and freq within 3 Hz)
|
||||||
|
@ -238,7 +238,7 @@ int get_wspr_channel_symbols(char* rawmessage, char* hashtab, unsigned char* sym
|
|||||||
} else if ( i2 < mlen ) { // just looks for a right slash
|
} else if ( i2 < mlen ) { // just looks for a right slash
|
||||||
// Type 2: PJ4/K1ABC 37
|
// Type 2: PJ4/K1ABC 37
|
||||||
callsign=strtok(message," ");
|
callsign=strtok(message," ");
|
||||||
if( strlen(callsign) < i2 ) return 0; //guards against pathological case
|
if( i2==0 || i2>strlen(callsign) ) return 0; //guards against pathological case
|
||||||
powstr=strtok(NULL," ");
|
powstr=strtok(NULL," ");
|
||||||
int power = atoi(powstr);
|
int power = atoi(powstr);
|
||||||
if( power < 0 ) power=0;
|
if( power < 0 ) power=0;
|
||||||
|
Loading…
Reference in New Issue
Block a user