[scponly] Bug Found in scponly-4.6 ("*** glibc detected *** free(): invalid pointer")
Kaleb Pederson
kibab at icehouse.net
Thu Jan 25 23:54:07 EST 2007
Irv,
Thanks for the report. You are indeed right! I have just committed a patch
to fix it.
Thanks.
--Kaleb
On Thursday 25 January 2007 03:24, Irv Elshoff wrote:
> Greetings,
>
> I found a bug in scponly 4.6 that causes WinSCP to fail whenever a
> server-side command is executed. The problem is the statement:
>
> discard_vector(safeenv);
>
> The argument is a global variable (not allocated), but the function
> tries to free it:
>
> void discard_vector(char **av)
> {
> char **tmpptr=av;
> while (*tmpptr!=NULL)
> free(*tmpptr++);
> *free(av);*
> }
>
> which results in an error message from glibc and WinSCP getting mixed up.
>
> My quick and dirty fix is to replace the calls (there are two) with:
>
> { char **tmpptr=safeenv; while (*tmpptr!=NULL) free(*tmpptr++); }
>
>
> Cheers,
> Irv.
More information about the scponly
mailing list