Author :
Yann Droneaud
Date :
2012-09-24 11:04:03
Hash :baae95dc Message :check color component strings decoding
New options --foreground and --background try to decode strings
in form RRGGBB[AA] where RGBA are hexadecimal digits.
But color_set() function does not ensure that the string contains
only hexadecimal digit.
This patch add a basic check on the number of item decoded by sscanf()
and add a check on the length of te parsed string.
The string is known to have the number of color components required
and being fully decoded.
Signed-off-by: Yann Droneaud <yann@droneaud.fr>