Closed GoogleCodeExporter closed 9 years ago
When parseTLV() crashes the parameter data initialy contained [0, 0, 0, 0, 35,
8, 64, 2, 80, 9, 120, 7, 18, 36, 0]
Just before the line
if data[0] == 0x81 and len(data)>0:
data contains
[0, 0, 0, 35, 8, 64, 2, 80, 9, 120, 7, 18, 36, 0]
[0, 35, 8, 64, 2, 80, 9, 120, 7, 18, 36, 0]
[8, 64, 2, 80, 9, 120, 7, 18, 36, 0]
[]
I propose to first check that len(data)>0 before accessing the first element.
With this change I have no crash and a normal display.
Patch attached.
Original comment by ludovic....@gmail.com
on 11 Nov 2010 at 11:12
Attachments:
This issue was closed by revision r39.
Original comment by eric.bou...@gmail.com
on 11 Nov 2010 at 3:10
Original issue reported on code.google.com by
ludovic....@gmail.com
on 11 Nov 2010 at 10:59