ensure map isn't NULL
main.c:1460:22: warning: Possible null pointer dereference: map [nullPointer]
w3mFuncList[(int)map[c]].func();
^
main.c:1503:24: note: Calling function 'escKeyProc', 3rd argument 'NULL' value is 0
escKeyProc((int)c, 0, NULL);
^
main.c:1438:25: note: Assuming condition is Assuming condition is false
if (CurrentKey >= 0 && CurrentKey & K_MULTI) {
^
main.c:1460:22: note: Null pointer dereference
w3mFuncList[(int)map[c]].func();
^
This commit is contained in:
@@ -1457,7 +1457,8 @@ escKeyProc(int c, int esc, unsigned char *map)
|
|||||||
esc |= (CurrentKey & ~0xFFFF);
|
esc |= (CurrentKey & ~0xFFFF);
|
||||||
}
|
}
|
||||||
CurrentKey = esc | c;
|
CurrentKey = esc | c;
|
||||||
w3mFuncList[(int)map[c]].func();
|
if (map)
|
||||||
|
w3mFuncList[(int)map[c]].func();
|
||||||
}
|
}
|
||||||
|
|
||||||
DEFUN(escmap, ESCMAP, "ESC map")
|
DEFUN(escmap, ESCMAP, "ESC map")
|
||||||
|
|||||||
Reference in New Issue
Block a user