Hi,
I think there is a bug at
https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/src/modules/rlm_counter/rlm_counter.c#L737

res cannot be an unsigned int. It should be an int because this condition -> https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/src/modules/rlm_counter/rlm_counter.c#L805 never can be false.

Let me know if i'm wrong.
Thanks,
MM