Hi!
>  pan/splitstr.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/pan/splitstr.c b/pan/splitstr.c
> index fbcd697..decfbf5 100644
> --- a/pan/splitstr.c
> +++ b/pan/splitstr.c
> @@ -122,6 +122,7 @@ const char **splitstr(const char *str, const char 
> *separator, int *argcount)
>               }
>       }
>       arg_array[num_toks] = NULL;
> +     free(arg_string);

As far as I can see the arg_string is destructively parsed with strtok()
and parts of the string are saved into the array that gets returned
at the end of the function. So freeing it will cause crash.

-- 
Cyril Hrubis
chru...@suse.cz

------------------------------------------------------------------------------
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to