Assure that pinfo is a valid pointer. Related to Coverity CID 112
svn path=/trunk/; revision=17601
This commit is contained in:
parent
25ff5cd787
commit
20707c71ec
|
@ -77,7 +77,7 @@ packet_info *pinfo, proto_item *pi, int group, int severity, const char *format,
|
|||
|
||||
|
||||
/* if this packet isn't loaded because of a read filter, don't output anything */
|
||||
if(pinfo->fd->num == 0) {
|
||||
if(pinfo == NULL || pinfo->fd->num == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -87,7 +87,7 @@ packet_info *pinfo, proto_item *pi, int group, int severity, const char *format,
|
|||
formatted[sizeof(formatted) - 1] = '\0';
|
||||
|
||||
ei = ep_alloc(sizeof(expert_info_t));
|
||||
ei->packet_num = pinfo ? pinfo->fd->num : 0;
|
||||
ei->packet_num = pinfo->fd->num;
|
||||
ei->group = group;
|
||||
ei->severity = severity;
|
||||
ei->protocol = ep_strdup(pinfo->current_proto);
|
||||
|
|
Loading…
Reference in New Issue