oLschema2ldif: Resolve multiple parsing bugs
The "oLschema2ldif" program contained multiple bugs triggered by malformed inputs:
- Iteration beyond list of recognized dsdb syntax OIDs when value wasn't found (bug 9567)
- NULL pointer dereference when input didn't define a name
- Heap buffer overflows for unterminated token values
Tests are added to reproduce all identified bugs.
Signed-off-by: Michael Hanselmann [email protected]
Then adapted to use ARRAY_SIZE() consistently as suggested by metze.
Signed-off-by: Andrew Bartlett [email protected]