v0.0.4: fix: improve data handling in store_packet function
- Adjusted data offset calculations to use SEGMENT_SIZE instead of copy_len, enhancing memory safety and preventing potential overflows when accessing packet data. - Ensured proper cleanup actions are triggered if the data offset exceeds the allocated size.