Преглед изворни кода

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