Fix issue in nat Bisearch algorithm (VPP-980)

Change-Id: I39b1d1ec6fb9a10e2a0e67d36b01c0bf2522d07f
Signed-off-by: flyingeagle23 <wang.hui56@zte.com.cn>
diff --git a/src/plugins/nat/nat.c b/src/plugins/nat/nat.c
index b13c857..faf75fc 100644
--- a/src/plugins/nat/nat.c
+++ b/src/plugins/nat/nat.c
@@ -1323,7 +1323,7 @@
           rand = 1 + (random_u32 (&sm->random_seed) % m->locals[hi].prefix);
           while (lo < hi)
             {
-              mid = ((hi - 1) >> 1) + lo;
+              mid = ((hi - lo) >> 1) + lo;
               (rand > m->locals[mid].prefix) ? (lo = mid + 1) : (hi = mid);
             }
           if (!(m->locals[lo].prefix >= rand))