﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
119	Undefined behavior in img.c	Matěj Plch	Olly Betts	"Hi,
therion uses img.h and img.c, and when I compile and run therion with Undefined Behavior Sanitizer, this error appears:

{{{
UndefinedBehaviorSanitizer: undefined-behavior
../extern/img.c:103:27: runtime error: left shift of 255 by 24 places cannot be represented in type 'int'
}}}

Problem is in function get32(), where shifting of signed value by 24 bits interferes with a sign bit. Bitwise operations should be done with unsigned types.

Therion CI job where this error occured: https://github.com/Afforix/therion/runs/2025117514?check_suite_focus=true."	defect	closed	minor	1.2.45	Other		fixed		
