eina: Fix bug in eina_convert_itoa
authorSylvain Laperche <sylvain.laperche@gmail.com>
Fri, 7 Mar 2014 02:58:36 +0000 (10:58 +0800)
committerCedric BAIL <cedric.bail@samsung.com>
Fri, 7 Mar 2014 05:17:28 +0000 (14:17 +0900)
commit53e0a2d6bd726385ae9c702eb54299287af781f6
tree9e96bf4685b9ef233a7a9d8cc61700b276ec1e9a
parente6faf98868ceb30e04eeb50f184ab398e004d85c
eina: Fix bug in eina_convert_itoa

The current implementation of eina_convert_itoa cannot convert INT_MIN.

When the input number is negative, the function negates it and this is
an undefined behavior for INT_MIN since -INT_MIN cannot be represented
in a signed int.

@fix T1062

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
src/lib/eina/eina_convert.c
src/tests/eina/eina_test_convert.c