From aadf09d1de53d785bfbf3ad936893d54f5f1bb6a Mon Sep 17 00:00:00 2001 From: aj Date: Thu, 5 Mar 2009 15:28:17 +0000 Subject: [PATCH] resolve an "undefined code" situation. the old code was undefined, but ok (variables where never used again in the "goto error" case). but the new code should be clearer on this. git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3658 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/pkcs15init/pkcs15-lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pkcs15init/pkcs15-lib.c b/src/pkcs15init/pkcs15-lib.c index aa3f4eb3..1b4f3057 100644 --- a/src/pkcs15init/pkcs15-lib.c +++ b/src/pkcs15init/pkcs15-lib.c @@ -3723,7 +3723,8 @@ sc_pkcs15init_parse_info(sc_card_t *card, while (p < end && (tag = *p++) != 0 && tag != 0xFF) { int r = 0; - if (p >= end || p + (n = *p++) > end) + n = *p; p++; + if (p >= end || p + n > end) goto error; switch (tag) {