[6793] in bugtraq

home help back first fref pref prev next nref lref last post

Re: simple kde exploit fix

daemon@ATHENA.MIT.EDU (Ton Hospel)
Mon May 18 14:11:44 1998

X-Complaints-To: thospel@mail.dma.be
Date: 	Sun, 17 May 1998 23:38:06 GMT
Reply-To: Ton Hospel <thospel@mail.dma.be>
From: Ton Hospel <thospel@MAIL.DMA.BE>
To: BUGTRAQ@NETSPACE.ORG

> Better fixing style:
>
>    char *env;
>    int   len;
>
>    env = getenv("HOME");
>    if (env) {
>       len = strlen(env);
>       if (len >= BUFLEN) len = BUFLEN-1;
>       memcpy(buffer, env, len);
>       env[len] = 0;

Oops, replace that last line by
        buffer[len] = 0;

>    } else do_something_intelligent();

home help back first fref pref prev next nref lref last post