Fix:#384 - Buffer overflow on Debian related to ICMP ping

This commit is contained in:
TheWitness committed 2025-12-10 09:56:23 -05:00
1 parent 980a1b0e00
commit 3d7abed9aa
2 files changed
+3 -2

No files matched your search

+1
View File
@@ -7,6 +7,7 @@ The Cacti Group | spine
-issue#373: Spine SNMPv3 SHA-512 auth doesn't work
-issue#374: Error DES is no longer supported on this system
-issue#383: Spine returns Segmentation fault
-issue#384: ICMP Buffer overflows on Debian/Unbuntu related recvfrom() calls
-issue: Clear up a few very minor leaks in spine
1.2.29
+2 -2
View File
@@ -418,9 +418,9 @@ int ping_icmp(host_t *host, ping_t *ping) {
if (total_time < host_timeout) {
#if !(defined(__CYGWIN__))
return_code = recvfrom(icmp_socket, socket_reply, LRG_BUFSIZE, MSG_WAITALL, (struct sockaddr *) &recvname, &fromlen);
return_code = recvfrom(icmp_socket, socket_reply, BUFSIZE, MSG_WAITALL, (struct sockaddr *) &recvname, &fromlen);
#else
return_code = recvfrom(icmp_socket, socket_reply, LRG_BUFSIZE, MSG_PEEK, (struct sockaddr *) &recvname, &fromlen);
return_code = recvfrom(icmp_socket, socket_reply, BUFSIZE, MSG_PEEK, (struct sockaddr *) &recvname, &fromlen);
#endif
if (return_code < 0) {