summaryrefslogtreecommitdiff
path: root/decoders/xfp/__init__.py
diff options
context:
space:
mode:
authorGerhard Sittig <gerhard.sittig@gmx.net>2023-07-14 08:12:13 +0200
committerGerhard Sittig <gerhard.sittig@gmx.net>2023-07-18 21:09:40 +0200
commit42fb0f33ff23c1633324bde8b3cf400493237d97 (patch)
tree07946a0f166bef048600c97e4274da39c79c6464 /decoders/xfp/__init__.py
parentbb6f9c500e4119aa9558dfc66ba82bf7ef3772c5 (diff)
downloadlibsigrokdecode-42fb0f33ff23c1633324bde8b3cf400493237d97.tar.gz
libsigrokdecode-42fb0f33ff23c1633324bde8b3cf400493237d97.zip
eeprom24xx: avoid access to caller's data after validity ends
The at24 EEPROM decoder's previous implementation happened to access caller's data even after the .decode() method invocation ended, and their content has changed or the data was not valid any longer. Get deep copies for those details which broke the test suite. Prepare "generous" deep copies for other data which currently doesn't trigger exceptions, but might be waiting for an accident to happen. Careful inspection of the complex implementation and relaxing the current greed of this commit remains for future commits. Comment heavily for awareness. It is assumed that the 'databyte' name is misleading. And that much of this upper layer decoder's complexity would be obsoleted by the lower layer decoder's providing more useful packets (bytes and their ACK state, read/write phases of transfers, complete transfers up to STOP, etc). This commit does not address those readability or layering concerns.
Diffstat (limited to 'decoders/xfp/__init__.py')
0 files changed, 0 insertions, 0 deletions