Ticket #9: avahi-0.6.5-bz179448.2.patch

File avahi-0.6.5-bz179448.2.patch, 1.4 kB (added by Jason Vas Dias <jvdias@…>, 6 years ago)

updated patch to fix issue

  • avahi-0.6.6/avahi-core/socket.c

    old new  
    456456    struct iovec io; 
    457457#ifdef IP_PKTINFO 
    458458    struct cmsghdr *cmsg; 
    459     uint8_t cmsg_data[CMSG_SPACE(sizeof(struct in_pktinfo))]; 
     459    struct cmsghdr cmsg_data[( CMSG_SPACE(sizeof(struct in_pktinfo)) / sizeof(struct cmsghdr)) + 1]; 
    460460#elif defined(IP_SENDSRCADDR) 
    461461    struct cmsghdr *cmsg; 
    462     uint8_t cmsg_data[CMSG_SPACE(sizeof(struct in_addr))]; 
     462    struct cmsghdr cmsg_data[( CMSG_SPACE(sizeof(struct in_addr)) / sizeof(struct cmsghdr)) + 1]; 
    463463#endif 
    464464 
    465465    assert(fd >= 0); 
     
    542542    struct msghdr msg; 
    543543    struct iovec io; 
    544544    struct cmsghdr *cmsg; 
    545     uint8_t cmsg_data[CMSG_SPACE(sizeof(struct in6_pktinfo))]; 
     545    struct cmsghdr cmsg_data[(CMSG_SPACE(sizeof(struct in6_pktinfo))/sizeof(struct cmsghdr)) + 1]; 
    546546 
    547547    assert(fd >= 0); 
    548548    assert(p); 
     
    596596    AvahiDnsPacket *p= NULL; 
    597597    struct msghdr msg; 
    598598    struct iovec io; 
    599     uint8_t aux[1024]; 
     599    struct cmsghdr aux[1024 / sizeof(struct cmsghdr)]; /* for alignment on ia64 ! */ 
    600600    ssize_t l; 
    601601    struct cmsghdr *cmsg; 
    602602    int found_addr = 0; 
     
    726726    AvahiDnsPacket *p = NULL; 
    727727    struct msghdr msg; 
    728728    struct iovec io; 
    729     uint8_t aux[64]; 
     729    struct cmsghdr aux[1024 / sizeof(struct cmsghdr)]; 
    730730    ssize_t l; 
    731731    int ms; 
    732732    struct cmsghdr *cmsg;