Ignore:
Timestamp:
May 12, 2015 1:56:29 AM (9 years ago)
Author:
ming
Message:

Re #1843 (misc): Fixed incorrect memcpy size in sock_common (thanks to Richard Mudgett for the patch and Joshua Colp for the report)

If an IPv6 UDP transport is configured with a link-local address, say fe80::21c:c0ff:fe4e:1a9e%eth0, which is an invalid format for an IPv6 address, it may cause crash. The invalid format causes pjproject to use an incorrect size parameter with memcpy().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjlib/src/pj/sock_common.c

    r4905 r5092  
    181181            if (status==PJ_SUCCESS) { 
    182182                pj_memcpy(&addr->ipv6.sin6_addr, &ai.ai_addr.ipv6.sin6_addr, 
    183                           sizeof(pj_sockaddr_in6)); 
     183                          sizeof(addr->ipv6.sin6_addr)); 
    184184            } 
    185185        } 
Note: See TracChangeset for help on using the changeset viewer.