autotrace / autotrace

bitmap to vector graphics converter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

at_color_parse() uses strtol(3) on each character

RalphCorderoy opened this issue · comments

https://github.com/autotrace/autotrace/blob/master/src/color.c#L42 shows a loop over each of six addresses of the hex characters in, for example, -background-color's argument, passing each address to strtol(3). This looks wrong. Either each character should contribute a value of 0-15 to c[i], or strtol() called once on the whole string.

Thanks for spotting this, @RalphCorderoy !
would you say, PR #24 is a fix?

Hi @jnweiger, Yes, that looks like it fixes the issue to me. Thanks.

Thanks again for the review! closed fixed.