bsdfan
bsdfan copied to clipboard
Segmentation fault when run with empty config file
I realise it's somewhat obscure edge-case scenario, but good programs should not crash. I've accidentally saved config file as empty and here we go:
Program received signal SIGSEGV, Segmentation fault.
0x0000000000202b23 in sanityCheck (levels=0x0, levels_size=0) at parser.c:78
78 if(levels[0].min_max[0]!=0 || levels[levels_size-1].min_max[1]<150)
(gdb) bt
#0 0x0000000000202b23 in sanityCheck (levels=0x0, levels_size=0) at parser.c:78
#1 0x0000000000202952 in readConfig (path=0x200c9c "/usr/local/etc/bsdfan.conf") at parser.c:71
#2 0x00000000002025df in main (argc=1, argv=0x7fffffffe620) at bsdfan.c:60