Can you please add a boundary check, something like:

```c
if (md->index >= count)
{
  ERROR ("snort plugin: Request for index %i when only %i are available.",
      md->index, count);
  continue;
}
```