fix segfault: unsolicited Paging Response

Do not crash when a Paging Response could not be associated with a VLR
subscriber.

Related: OS#4449
Change-Id: Ie117949dd6da86afaa1a0a6ac57bf2111f6cff43
This commit is contained in:
Neels Hofmeyr 2020-03-09 21:01:56 +01:00
parent 40b11c9ba4
commit ebf55f4b31
1 changed files with 5 additions and 0 deletions

View File

@ -137,6 +137,11 @@ static void paging_concludes(struct vlr_subscr *vsub, struct msc_a *msc_a)
struct paging_request *pr, *pr_next; struct paging_request *pr, *pr_next;
struct paging_signal_data sig_data; struct paging_signal_data sig_data;
if (!vsub) {
/* A Paging Response has no subscriber. (Related: OS#4449) */
return;
}
osmo_timer_del(&vsub->cs.paging_response_timer); osmo_timer_del(&vsub->cs.paging_response_timer);
llist_for_each_entry_safe(pr, pr_next, &vsub->cs.requests, entry) { llist_for_each_entry_safe(pr, pr_next, &vsub->cs.requests, entry) {