| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Replace strncpy() with inet_ntop() to prevent potential truncation Cast tcplen to size_t to resolve signedness comparison warning. Changes: - Use ``inet_ntop(AF_INET, &bullshit, sourcehost, sizeof(sourcehost))`` instead of ``strncpy(sourcehost, inet_ntoa(bullshit), 16)`` to ensure string termination - Cast tcplen to size_t in assert ```c assert((size_t)tcplen >= sizeof(tcp)) ``` to remove the -Wsign-compare warning This removes compiler warnings and improves code safety.
|
The cast has just been fixed by another pr but the inet_ntop(AF_INET, &bullshit, sourcehost, sizeof(sourcehost)) is still not fixed |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Replace strncpy() with inet_ntop() and fix signedness warning
Use inet_ntop(AF_INET, &bullshit, sourcehost, sizeof(sourcehost))
instead of strncpy() for safer buffer handling.
Cast tcplen to size_t in assert() function call to resolve the -Wsign-compare warning.