Skip to content

src/backend.c: null pointer dereference suspected by coverity #2922

@chipitsine

Description

@chipitsine

Tool Name and Version

coverity

Code Report

/src/backend.c: 891 in alloc_dst_address()
885                     if (!(s->flags & SF_ASSIGNED))
886                             return SRV_STATUS_INTERNAL;
887     
888                     if (!sockaddr_alloc(ss, NULL, 0))
889                             return SRV_STATUS_INTERNAL;
890     
>>>     CID 1596090:  Null pointer dereferences  (FORWARD_NULL)
>>>     Dereferencing null pointer "srv".
891                     **ss = srv->addr;
892                     set_host_port(*ss, srv->svc_port);
893                     if (!is_addr(*ss)) {
894                             /* if the server has no address, we use the same address
895                              * the client asked, which is handy for remapping ports
896                              * locally on multiple addresses at once. Nothing is done

Additional Information

No response

Output of haproxy -vv

no

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: code-reportThis issue describes a code report (like valgrind or coverity)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions