mirror of
https://github.com/Hamlib/Hamlib.git
synced 2024-09-21 10:27:18 +00:00
Fix possible segfault in 2038 testing
This commit is contained in:
parent
25da0396c9
commit
08c82ddbb5
@ -3109,7 +3109,7 @@ int rig_test_2038(RIG *rig)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (strstr(s, "2097")) { return RIG_OK; }
|
||||
if (s != NULL && strstr(s, "2097")) { return RIG_OK; }
|
||||
|
||||
#if defined(__MSVCRT_VERSION__)
|
||||
_ctime64_s(s, sizeof(s), &x);
|
||||
@ -3117,7 +3117,7 @@ int rig_test_2038(RIG *rig)
|
||||
s = ctime(&x);
|
||||
#endif
|
||||
|
||||
if (strstr(s, "2097")) { return RIG_OK; }
|
||||
if (s != NULL && strstr(s, "2097")) { return RIG_OK; }
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user