Closed teknoraver closed 4 years ago
Had a same problem. Looks it misses new_automops init.
26 struct automops * automops_init(void)
27 {
28 // Create initial automops element:
29 struct automops *new_automops = (struct automops*) malloc(sizeof(struct automops));
30 memset(new_automops, 0x0, sizeof(struct automops)); <-- here
Given the error flow, I believe it’s because the allocated memory for the automop strict is not guaranteed to be zero, due to the use of ‘malloc’ over ‘calloc’. https://github.com/netsniff-ng/netsniff-ng/blob/master/staging/automops.c#L29
This could make the non-NULL conditional protecting execution of ’automop_delete_fields’ pass, even though ‘fields’ is not actually a valid pointer.
backtrace: