Created attachment 443240 [details, diff] Fix default type name if not given check_snmp_storage segfaults when -T/--type is not given and -w and -c have reversed values for the default type. Segfaults occurs when it tries to print the error message: $ gdb --args /usr/lib64/nagios/plugins/check_snmp_storage -C my-own-community -H 127.0.0.1 -m /usr/portage/distfiles -w 30 -c 10 <snip> Reading symbols from /usr/lib64/nagios/plugins/check_snmp_storage...done. (gdb) r Starting program: /usr/lib64/nagios/plugins/check_snmp_storage -C my-own-community -H 127.0.0.1 -m /usr/portage/distfiles -w 30 -c 10 Program received signal SIGSEGV, Segmentation fault. 0x000003fff7789da5 in vfprintf () from /lib64/libc.so.6 (gdb) bt #0 0x000003fff7789da5 in vfprintf () from /lib64/libc.so.6 #1 0x000003fff783f7e2 in __printf_chk () from /lib64/libc.so.6 #2 0x000002aaaaaac3c6 in printf (__fmt=<optimized out>) at /usr/include/bits/stdio2.h:104 #3 main (argc=<optimized out>, argv=<optimized out>) at check_snmp_storage.c:252 (gdb) Attached patch assigns the plaintext type name to the variable if not given.