From 2cd4899a4210bd9861801fd1da9805fa032378c8 Mon Sep 17 00:00:00 2001 From: frankmorgner Date: Mon, 24 Jan 2011 15:30:11 +0000 Subject: [PATCH] fixed path walking (fixes 3164775) git-svn-id: https://vsmartcard.svn.sourceforge.net/svnroot/vsmartcard@392 96b47cad-a561-4643-ad3b-153ac7d7599c --- .../src/vpicc/virtualsmartcard/SmartcardFilesystem.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py index 2b9c2ad..ca1049a 100644 --- a/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py +++ b/virtualsmartcard/src/vpicc/virtualsmartcard/SmartcardFilesystem.py @@ -45,11 +45,11 @@ def walk(start, path): # {{{ if len(path) % 2 != 0: raise SwError(SW["ERR_INCORRECTPARAMETERS"]) index = 0 - while index < len(path): + while index + 2 < len(path): if not isinstance(start, DF): # File or application not found raise SwError(SW["ERR_FILENOTFOUND"]) - start = start.select('fid', stringtoint(path[:2])) + start = start.select('fid', stringtoint(path[index:index+2])) index = index + 2 return start