mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
lz4stream info to int: use memcpy
This commit is contained in:
parent
cce2e7aad3
commit
d48fcbf5eb
2 changed files with 5 additions and 9 deletions
|
@ -190,10 +190,8 @@ bool FpgaSetupSscDma(uint8_t *buf, int len) {
|
|||
static int get_from_fpga_combined_stream(lz4_streamp compressed_fpga_stream, uint8_t *output_buffer) {
|
||||
if (fpga_image_ptr == output_buffer + FPGA_RING_BUFFER_BYTES) { // need more data
|
||||
fpga_image_ptr = output_buffer;
|
||||
int cmp_bytes = *(compressed_fpga_stream->next_in + 3);
|
||||
cmp_bytes = (cmp_bytes << 8) + *(compressed_fpga_stream->next_in+2);
|
||||
cmp_bytes = (cmp_bytes << 8) + *(compressed_fpga_stream->next_in+1);
|
||||
cmp_bytes = (cmp_bytes << 8) + *(compressed_fpga_stream->next_in+0);
|
||||
int cmp_bytes;
|
||||
memcpy(&cmp_bytes, compressed_fpga_stream->next_in, sizeof(int));
|
||||
compressed_fpga_stream->next_in += 4;
|
||||
compressed_fpga_stream->avail_in -= cmp_bytes + 4;
|
||||
int res = LZ4_decompress_safe_continue(compressed_fpga_stream->lz4StreamDecode,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue