Don't dereference NULL pointer.
This commit is contained in:
parent
1812390e23
commit
9188800c31
@ -601,7 +601,10 @@ getcap()
|
||||
KR = tgetstr("kr", &ap);
|
||||
KU = tgetstr("ku", &ap);
|
||||
KD = tgetstr("kd", &ap);
|
||||
Klength = strlen(KL);
|
||||
if (KL && KR && KU && KD)
|
||||
Klength = strlen(KL);
|
||||
else
|
||||
Klength = 0;
|
||||
/* NOTE: If KL, KR, KU, and KD are not
|
||||
* all the same length, some problems
|
||||
* may arise, since tests are made on
|
||||
|
Loading…
x
Reference in New Issue
Block a user