ソースを参照

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;
       }