* teleinfo: avoid a buffer overflow.
When reading tag or values, data is written to the buffer even if the
size if bigger than the buffer. Add a new 'max_len' argument to
get_field() to avoid this error.
Signed-off-by: 0hax <0hax@protonmail.com>
* teleinfo: read extra timestamp field for some tags.
Some tags has an extra timestamp field that need to be read before the
actual data.
The code is inspired by Jpsy work:
29339c14f9
Signed-off-by: 0hax <0hax@protonmail.com>
* teleinfo: increase MAX_BUF_SIZE to suffice for 3-phase Linky in Standard mode.
* teleinfo: handle DATE tag correctly.
The DATE tag is special due its format and need to be handled
separately.
Fix from DrCoolzic.
Signed-off-by: 0hax <0hax@protonmail.com>
Co-authored-by: Jörg Wagner <jwagner@digilog.de>