commands: return none, when offset exceeds file length
The computed length of the file may be negative, when the offset exceeds the file length. When this is the case, return none Change-Id: I2c017c620254fae188022851ef3b670730aab503
This commit is contained in:
@@ -155,6 +155,9 @@ class SimCardCommands(object):
|
||||
return (None, None)
|
||||
if length is None:
|
||||
length = self.__len(r) - offset
|
||||
if length < 0:
|
||||
return (None, None)
|
||||
|
||||
total_data = ''
|
||||
chunk_offset = 0
|
||||
while chunk_offset < length:
|
||||
|
||||
Reference in New Issue
Block a user