libc/iconv: find_alias was mis-computing remaining alias table length
This caused the strnstr to walk off the end of the alias array and fetch invalid data. Instead of attempting to update 'len', just re-compute it based on the table end pointer that is already known. Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
5660c28317
commit
940ac9e35d
|
@ -115,7 +115,7 @@ search_again:
|
|||
&& (p+l == table_end || isspace (*(p+l)) || *(p+l) == '\n')))
|
||||
{
|
||||
ptable = p + l;
|
||||
len -= table - p;
|
||||
len = table_end - ptable;
|
||||
goto search_again;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue