So here for some language legalese:
ufraw calls the c method, where it's (to my understanding) legal to treat an enum as an int. It's not nice to exceed the bounds, but it's legal.
In lensfun, the C function is a wrapper around the c++ method. There the compiler may reduce the size of the enum (as per upstream bug report). So this wrapper needs adjustment to check the enum for the bounds. How tricky :).
So here for some language legalese:
ufraw calls the c method, where it's (to my understanding) legal to treat an enum as an int. It's not nice to exceed the bounds, but it's legal.
In lensfun, the C function is a wrapper around the c++ method. There the compiler may reduce the size of the enum (as per upstream bug report). So this wrapper needs adjustment to check the enum for the bounds. How tricky :).
I'll upload a fix soonish (maybe this evening).
Cheers,
Stefan.