sharkd: check for NULL before dereference (found by clang).
Change-Id: If49504b3360e325555a624b11a43ac30884748c9 Reviewed-on: https://code.wireshark.org/review/25337 Petri-Dish: Jakub Zawadzki <darkjames-ws@darkjames.pl> Tested-by: Petri Dish Buildbot Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
This commit is contained in:
parent
48b4b3bdad
commit
afcff2dcd1
|
@ -1101,6 +1101,9 @@ sharkd_session_packet_tap_expert_cb(void *tapdata, packet_info *pinfo _U_, epan_
|
|||
expert_info_t *ei = (expert_info_t *) pointer;
|
||||
|
||||
ei = (expert_info_t *) g_memdup(ei, sizeof(*ei));
|
||||
if (ei == NULL)
|
||||
return FALSE;
|
||||
|
||||
ei->protocol = g_string_chunk_insert_const(etd->text, ei->protocol);
|
||||
ei->summary = g_string_chunk_insert_const(etd->text, ei->summary);
|
||||
|
||||
|
|
Loading…
Reference in New Issue