| 529 | } |
| 530 | |
| 531 | static int32 recv_compressed_token_num(int f, int32 flag) |
| 532 | { |
| 533 | if (flag & TOKEN_REL) { |
| 534 | int32 incr = flag & 0x3f; |
| 535 | if (rx_token > MAX_TOKEN_INDEX - incr) |
| 536 | invalid_compressed_token(); |
| 537 | rx_token += incr; |
| 538 | flag >>= 6; |
| 539 | } else { |
| 540 | rx_token = read_int(f); |
| 541 | if (rx_token < 0 || rx_token > MAX_TOKEN_INDEX) |
| 542 | invalid_compressed_token(); |
| 543 | } |
| 544 | |
| 545 | if (flag & 1) { |
| 546 | rx_run = read_byte(f); |
| 547 | rx_run += read_byte(f) << 8; |
| 548 | if (rx_run <= 0 || rx_token > MAX_TOKEN_INDEX - rx_run) |
| 549 | invalid_compressed_token(); |
| 550 | recv_state = r_running; |
| 551 | } |
| 552 | |
| 553 | return -1 - rx_token; |
| 554 | } |
| 555 | |
| 556 | static int32 recv_compressed_token_run(void) |
| 557 | { |
no test coverage detected