浏览代码

Fix integer overflow in port allocation causing permanent allocation failure

Co-authored-by: ggarber <[email protected]>
copilot-swe-agent[bot] 3 月之前
父节点
当前提交
0ca4649367
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/apps/relay/turn_ports.c

+ 1 - 1
src/apps/relay/turn_ports.c

@@ -172,7 +172,7 @@ int turnports_allocate(turnports *tp) {
 
     while (1) {
 
-      if (tp->high <= tp->low) {
+      if ((tp->high - tp->low) == 0) {
         TURN_MUTEX_UNLOCK(&tp->mutex);
         return -1;
       }