Fix MSVC warnings.
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).
Loading
Please register or sign in to comment