diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-05-10 20:00:07 -0400 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-07-24 13:51:34 -0400 |
| commit | 9403d28515c104ca04df390a1ae9fa6fd3ce0e42 (patch) | |
| tree | 87f23c2914601dab439175f68a5cbe300a99c93e /pimd/pim_msg.c | |
| parent | 2e8345c139470430c34c1fa18521ba7a566b89ad (diff) | |
pimd: Prevent NULL dereference
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_msg.c')
| -rw-r--r-- | pimd/pim_msg.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pimd/pim_msg.c b/pimd/pim_msg.c index 04f1f4846f..67faa39364 100644 --- a/pimd/pim_msg.c +++ b/pimd/pim_msg.c @@ -104,6 +104,9 @@ size_t pim_msg_get_jp_group_size(struct list *sources) struct pim_jp_sources *js; size_t size = 0; + if (!sources) + return 0; + size += sizeof(struct pim_encoded_group_ipv4); size += 4; // Joined sources (2) + Pruned Sources (2) |
