____________________________________________________________ Read a chunk of data from the IO buffer. Return a pointer to the first position NOT read into.
| 974 | // Return a pointer to the first position NOT read into. |
| 975 | // |
| 976 | UCHAR* MVOL_read_block(BurpGlobals* tdgbl, UCHAR* ptr, ULONG count) |
| 977 | { |
| 978 | while (count) |
| 979 | { |
| 980 | // If buffer empty, reload it |
| 981 | if (tdgbl->gbl_io_cnt <= 0) |
| 982 | MVOL_read(tdgbl); |
| 983 | |
| 984 | const ULONG n = MIN(count, (ULONG) tdgbl->gbl_io_cnt); |
| 985 | |
| 986 | // Copy data from the IO buffer |
| 987 | |
| 988 | memcpy(ptr, tdgbl->gbl_io_ptr, n); |
| 989 | ptr += n; |
| 990 | |
| 991 | // Skip ahead in current buffer |
| 992 | |
| 993 | count -= n; |
| 994 | tdgbl->gbl_io_cnt -= n; |
| 995 | tdgbl->gbl_io_ptr += n; |
| 996 | } |
| 997 | |
| 998 | return ptr; |
| 999 | } |
| 1000 | |
| 1001 | |
| 1002 | //____________________________________________________________ |
nothing calls this directly
no test coverage detected