@@ 1546-1556 (lines=11) @@ | ||
1543 | $bnum = 127 - $depth; |
|
1544 | $idx = $bnum >> 3; |
|
1545 | $b_mask = 1 << ( $bnum & 7 ^ 7 ); |
|
1546 | if ( ( $v6vec[ $idx ] & $b_mask ) > 0 ) { |
|
1547 | if ( $x[1] >= $this->databaseSegments ) { |
|
1548 | return $x[1]; |
|
1549 | } |
|
1550 | $offset = $x[1]; |
|
1551 | } else { |
|
1552 | if ( $x[0] >= $this->databaseSegments ) { |
|
1553 | return $x[0]; |
|
1554 | } |
|
1555 | $offset = $x[0]; |
|
1556 | } |
|
1557 | } |
|
1558 | ||
1559 | $this->log( 'GeoIP API: Error traversing database - perhaps it is corrupt?' ); |
|
@@ 1599-1611 (lines=13) @@ | ||
1596 | $x[ $i ] += ord( $buf[ $this->record_length * $i + $j ] ) << ( $j * 8 ); |
|
1597 | } |
|
1598 | } |
|
1599 | if ( $ipnum & ( 1 << $depth ) ) { |
|
1600 | if ( $x[1] >= $this->databaseSegments ) { |
|
1601 | return $x[1]; |
|
1602 | } |
|
1603 | ||
1604 | $offset = $x[1]; |
|
1605 | } else { |
|
1606 | if ( $x[0] >= $this->databaseSegments ) { |
|
1607 | return $x[0]; |
|
1608 | } |
|
1609 | ||
1610 | $offset = $x[0]; |
|
1611 | } |
|
1612 | } |
|
1613 | ||
1614 | $this->log( 'GeoIP API: Error traversing database - perhaps it is corrupt?' ); |