Skip to content
Snippets Groups Projects
Commit e9dd4626 authored by Alaric Senat's avatar Alaric Senat Committed by Steve Lhomme
Browse files

lib: avoid negating VLC_EGENERIC error code

`VLC_EGENERIC` is defined to `INT_MIN` and negating as a 32 bits integer
is undefined behavior.
Let's print a custom error message instead, as it will never be a valid
errno value anyway.

Reported by UBSAN:
../../lib/core.c:72:9: runtime error: negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself
parent 7583f14f
No related branches found
No related tags found
1 merge request!5653lib: avoid negating VLC_EGENERIC error code
Pipeline #486225 passed with stage
in 14 minutes and 21 seconds
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment