- minor signedness issue

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@801 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2002-12-19 21:17:06 +00:00
parent 882c5b9ed3
commit 34d45b2210
1 changed files with 1 additions and 1 deletions

View File

@ -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];
}