commit 0aeb78a6012cfe43ec1fcd77e6a72aaf536fb141 Author: Adrian Bunk Date: Wed Jan 28 21:08:25 2009 +0200 ohmd/ohm-plugin.c: fix an off-by-one This fixes an off-by-one error that caused ohmd crashes in the ARM Linux Internet Platform [1]. [1] http://linux.onarm.com/ diff --git a/ohmd/ohm-plugin.c b/ohmd/ohm-plugin.c index dcce2a6..edd1e67 100644 --- a/ohmd/ohm-plugin.c +++ b/ohmd/ohm-plugin.c @@ -245,7 +245,7 @@ const gchar * ohm_plugin_find_udi_from_id (OhmPlugin *plugin, guint id) { /* overrange check */ - if (id > plugin->priv->hal_udis->len) { + if (id >= plugin->priv->hal_udis->len) { return NULL; } return g_ptr_array_index (plugin->priv->hal_udis, id);