Skip to content
  • Timothy B. Terriberry's avatar
    Fix MSVC warnings. · d0c82543
    Timothy B. Terriberry authored
    Some of these pointed to real potential overflows (given arbitrary
     inputs by the calling application).
    I was sad about stripping const qualifiers from the struct addrinfo
     pointers, but MSVC seems to erroneously think that an array of
     pointers to constant data is itself a pointer to constant data (or
     maybe that it is not compatible with a const void *?), and
     converting the memmove()s to for loops triggered an erroneous
     warning about out-of-bounds array accesses in gcc (but on only one
     of the two identical loops).
    d0c82543