Guard int comparison against overflow
Guard int comparison against overflow

johannrudi/libsc,cburstedde/libsc,johannrudi/libsc,cburstedde/libsc,holke/libsc,johannrudi/libsc,cburstedde/libsc,holke/libsc,cburstedde/libsc,holke/libsc,johannrudi/libsc,johannrudi/libsc,cburstedde/libsc,holke/libsc