* Copyright (C) 1995-2005, Index Data ApS
* See the file LICENSE for details.
*
- * $Id: ber_oid.c,v 1.7 2005-06-25 15:46:03 adam Exp $
+ * $Id: ber_oid.c,v 1.8 2006-04-17 07:40:15 adam Exp $
*/
/**
len--;
}
while (*(o->bp++) & 0X80);
+
+ if (id < 0)
+ {
+ odr_seterror(o, ODATA, 23);
+ return 0;
+ }
if (pos > 0)
p[pos++] = id;
else
return 0;
}
}
+ if (pos < 2 || p[0] < 0 || p[1] < 0)
+ {
+ odr_seterror(o, ODATA, 23);
+ return 0;
+ }
p[pos] = -1;
return 1;
case ODR_ENCODE:
odr_seterror(o, ODATA, 23);
return 0;
}
- for (pos = 1; p[pos] >= 0; pos++)
+ for (pos = 1; p[pos] != -1; pos++)
{
n = 0;
if (pos == 1)