Changeset 3277 for trunk/src/libopensc/card-asepcos.c
- Timestamp:
- 09/29/07 07:43:25 (16 months ago)
- Files:
-
- 1 modified
-
trunk/src/libopensc/card-asepcos.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libopensc/card-asepcos.c
r3263 r3277 213 213 214 214 while (len != 0) { 215 if (len < 4 || in[0] != 0x8b || in[1] != 0x02)215 if (len < 4) 216 216 return SC_ERROR_INTERNAL; 217 if (in[0] != 0x8b || in[1] != 0x02) 218 return SC_ERROR_INVALID_ASN1_OBJECT; 217 219 /* append file id to the path */ 218 220 r = sc_append_path_id(out, &in[2], 2); … … 269 271 270 272 r = asepcos_get_current_df_path(card, &tpath); 271 if (r != SC_SUCCESS) 272 return r; 273 if (sc_compare_path_prefix(&tpath, &npath) != 0) { 273 /* workaround: as opensc can't handle paths with file id 274 * and application names in it let's ignore the current 275 * DF if the returned path contains a unsupported tag. 276 */ 277 if (r != SC_ERROR_INVALID_ASN1_OBJECT && r != SC_SUCCESS) 278 return r; 279 if (r == SC_SUCCESS && sc_compare_path_prefix(&tpath, &npath) != 0) { 274 280 /* remove the currently selected DF from the path */ 275 281 if (tpath.len == npath.len) {
