From 34d45b2210d3a875ae73ef485447951c3dc1c309 Mon Sep 17 00:00:00 2001 From: okir Date: Thu, 19 Dec 2002 21:17:06 +0000 Subject: [PATCH] - minor signedness issue git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@801 c6295689-39f2-0310-b995-f0e70906c6a9 --- src/libopensc/sc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libopensc/sc.c b/src/libopensc/sc.c index 0657bb33..da071406 100644 --- a/src/libopensc/sc.c +++ b/src/libopensc/sc.c @@ -106,7 +106,7 @@ int sc_bin_to_hex(const u8 *in, size_t in_len, char *out, size_t out_len, struct sc_slot_info * _sc_get_slot_info(struct sc_reader *reader, int slot_id) { assert(reader != NULL); - if (slot_id > reader->slot_count) + if (slot_id < 0 || slot_id > reader->slot_count) return NULL; return &reader->slot[slot_id]; }