chan_dect: fix potential NULL pointer dereference
'c' is only set if there is a RING_PATTERN environment variable, 'pattern' is the correct pointer to use. Signed-off-by: Patrick McHardy <kaber@trash.net>
This commit is contained in:
parent
3d546f101d
commit
0f024e7582
|
@ -582,7 +582,7 @@ static void dect_mncc_alert_ind(struct dect_handle *dh, struct dect_call *call,
|
|||
|
||||
if (strcasecmp(pattern, "silent")) {
|
||||
dect_ie_init(&signal);
|
||||
signal.code = DECT_SIGNAL_ALERTING_BASE | (atoi(c) & 0xf);
|
||||
signal.code = DECT_SIGNAL_ALERTING_BASE | (atoi(pattern) & 0xf);
|
||||
}
|
||||
|
||||
dect_display_init(&display);
|
||||
|
|
Reference in New Issue