Skip to content
Snippets Groups Projects
Select Git revision
0 results

AttributeName.cpp

  • Reynald Bourtembourg's avatar
    9f787c82
    Fix potential crash in AttributeName::tangoHostWithDomain() · 9f787c82
    Reynald Bourtembourg authored
    Fix crash when getaddrinfo is returning several struct addrinfo
    (tango-controls-hdbpp/hdbpp-cm#6 (comment))
    The second struct addrinfo contains a field ai-canonname which is NULL.
    This could cause a crash because some code is attempting to create a string from a null pointer.
    
    getaddrinfo man page (on Debian Buster) says the following:
    
            If hints.ai_flags includes the AI_CANONNAME flag, then the ai_canon-
            name field of the first of the addrinfo structures in the returned
            list is set to point to the official name of the host.
    
    So there is no need to look at the following addrinfo returned structures.
    9f787c82
    History
    Fix potential crash in AttributeName::tangoHostWithDomain()
    Reynald Bourtembourg authored
    Fix crash when getaddrinfo is returning several struct addrinfo
    (tango-controls-hdbpp/hdbpp-cm#6 (comment))
    The second struct addrinfo contains a field ai-canonname which is NULL.
    This could cause a crash because some code is attempting to create a string from a null pointer.
    
    getaddrinfo man page (on Debian Buster) says the following:
    
            If hints.ai_flags includes the AI_CANONNAME flag, then the ai_canon-
            name field of the first of the addrinfo structures in the returned
            list is set to point to the official name of the host.
    
    So there is no need to look at the following addrinfo returned structures.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.