Fix potential segfault in cmdstr check in kenwood.c

pull/1242/head
Mike Black W9MDB 2023-02-21 11:44:12 -06:00
rodzic fb12668f06
commit 717dae5027
2 zmienionych plików z 2 dodań i 2 usunięć

Wyświetl plik

@ -517,7 +517,7 @@ transaction_read:
if (datasize) if (datasize)
{ {
// we ignore the special ;;;;PS; command // we ignore the special ;;;;PS; command
if (strcmp(cmdstr, ";;;;PS") != 0 && cmdstr && (buffer[0] != cmdstr[0] if (cmdstr && strcmp(cmdstr, ";;;;PS") != 0 && (buffer[0] != cmdstr[0]
|| (cmdstr[1] && buffer[1] != cmdstr[1]))) || (cmdstr[1] && buffer[1] != cmdstr[1])))
{ {
/* /*

Wyświetl plik

@ -28,7 +28,7 @@
#include "token.h" #include "token.h"
#include "idx_builtin.h" #include "idx_builtin.h"
#define BACKEND_VER "20230219" #define BACKEND_VER "20230221"
#define EOM_KEN ';' #define EOM_KEN ';'
#define EOM_TH '\r' #define EOM_TH '\r'