| 1031 | /* Return the length of an LEB128 number. */ |
| 1032 | |
| 1033 | static size_t |
| 1034 | leb128_len (const unsigned char *p) |
| 1035 | { |
| 1036 | size_t ret; |
| 1037 | |
| 1038 | ret = 1; |
| 1039 | while ((*p & 0x80) != 0) |
| 1040 | { |
| 1041 | ++p; |
| 1042 | ++ret; |
| 1043 | } |
| 1044 | return ret; |
| 1045 | } |
| 1046 | |
| 1047 | /* Read initial_length from BUF and advance the appropriate number of bytes. */ |
| 1048 |