snmptranslate.c (v1.0): optind not reset to 1 between calls
Brought to you by:
alsterg
On version 1.0, global optind is not reset to 1 before calling getopt() in snmptranslate().
This results in "snmp translate" failing in subsequent calls, because getopt() runs out of arguments to parse (possibly resulting in a core dumped).
Simply adding a
optind = 1;
before the call to getopt() seems to work.