{"action":"opened","issue":{"url":"https://api.github.com/repos/dannywarren/cnagios/issues/1","labels_url":"https://api.github.com/repos/dannywarren/cnagios/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/dannywarren/cnagios/issues/1/comments","events_url":"https://api.github.com/repos/dannywarren/cnagios/issues/1/events","html_url":"https://github.com/dannywarren/cnagios/issues/1","id":99838786,"number":1,"title":"Segmentation fault when reloading nagios status","user":{"login":"dannywarren","id":1855355,"avatar_url":"https://avatars.githubusercontent.com/u/1855355?v=3","gravatar_id":"","url":"https://api.github.com/users/dannywarren","html_url":"https://github.com/dannywarren","followers_url":"https://api.github.com/users/dannywarren/followers","following_url":"https://api.github.com/users/dannywarren/following{/other_user}","gists_url":"https://api.github.com/users/dannywarren/gists{/gist_id}","starred_url":"https://api.github.com/users/dannywarren/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dannywarren/subscriptions","organizations_url":"https://api.github.com/users/dannywarren/orgs","repos_url":"https://api.github.com/users/dannywarren/repos","events_url":"https://api.github.com/users/dannywarren/events{/privacy}","received_events_url":"https://api.github.com/users/dannywarren/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-08T22:13:55Z","updated_at":"2015-08-08T22:13:55Z","closed_at":null,"body":"Somewhere after the release of nagios 3.5, cnagios started to segfault when reloading the status.dat file.\r\n\r\nBacktrace from the segfault:\r\n\r\n    #0  0x0000000801754e00 in sbrk () from /lib/libc.so.7\r\n    #1  0x000000080175042e in sbrk () from /lib/libc.so.7\r\n    #2  0x00000008017507af in sbrk () from /lib/libc.so.7\r\n    #3  0x000000080175bdf5 in free () from /lib/libc.so.7\r\n    #4  0x0000000000404a8a in read_status () at read.c:90\r\n    #5  0x00000000004051df in getch_loop () at cmds.c:183\r\n    #6  0x0000000000403255 in main (argc=<value optimized out>, argv=<value optimized out>) at cnagios.c:253\r\n\r\nRelevant section of read.c:\r\n\r\n    for ( i = 0; i < service_list_size; i++ ) {\r\n      for ( j = 0; j < STATUS_LIST_ENTRY_SIZE; j++ ) {\r\n        if ( j == LAST_UPDATE ) { continue; }\r\n        if ( j == LAST_STATE_CHANGE_INT ) { continue; }\r\n        free(service_list[i][j]);\r\n        service_list[i][j] = NULL;\r\n      }\r\n    }\r\n"}}