Comments (2)
Fixed by d49a180#diff-9c354da30936a2dab18e233b468f309b
I used your example as a test case, which now passes.
I guess some cards use values 0x85-0xFF in the length byte to encode lengths of 133-255 bytes. In your example that's 0x91 = 145 bytes. The code was interpreting that as a length encoded in 17 bytes. Which also isn't valid..
One spec mentions 0x91 in the first length byte is invalid http://www.embedx.com/pdfs/ISO_STD_7816/info_isoiec7816-4%7Bed21.0%7Den.pdf
In ISO/IEC 7816, the values '80' and '85' to 'FF' are invalid for the first byte of length fields.
I guess either there's a different spec or what's actually in production defines what's valid 😄. Either way it now parses.
from emv-bertlv.
Thanks for the report
from emv-bertlv.
Related Issues (7)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emv-bertlv.