Avoid signed overflows with random variables.
Avoid signed overflows with random variables.

Setting a long variable to LONG_MIN and negating it is undefined
behaviour. You can notify this easily when compiling code with
--fsanitize=undefined. Offending code would be

    poptSaveLong(&arg, POPT_ARGFLAG_RANDOM, LONG_MIN);

Incrementing the resulting value could also lead to undefined
behaviour if the random value was LONG_MAX. Consider this corner
case as well.

GerHobbelt/POPT,GerHobbelt/POPT,GerHobbelt/POPT