You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2023/02/07 19:09:06 UTC

[trafficserver] branch master updated: Fix stack overflow on sending UDP packets (#9381)

This is an automated email from the ASF dual-hosted git repository.

maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new f099a592f8 Fix stack overflow on sending UDP packets (#9381)
f099a592f8 is described below

commit f099a592f858a15d6affe1485b38d54ef9629071
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Tue Feb 7 12:08:58 2023 -0700

    Fix stack overflow on sending UDP packets (#9381)
---
 iocore/net/UnixUDPNet.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iocore/net/UnixUDPNet.cc b/iocore/net/UnixUDPNet.cc
index ec2eef0e98..daca6c2b88 100644
--- a/iocore/net/UnixUDPNet.cc
+++ b/iocore/net/UnixUDPNet.cc
@@ -979,7 +979,7 @@ sendPackets:
     bytesThisPipe       -= pktLen;
     packets[npackets++] = p;
   next_pkt:
-    if (bytesThisPipe < 0 && npackets == N_MAX_PACKETS) {
+    if (bytesThisPipe < 0 || npackets == N_MAX_PACKETS) {
       break;
     }
   }