Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 375157 | Differences between
and this patch

Collapse All | Expand All

(-)tftp-hpa-5.1/tftp/tftp.c.orig (-4 / +7 lines)
Lines 279-292 Link Here
279
            struct tftphdr *tp, const char *mode)
279
            struct tftphdr *tp, const char *mode)
280
{
280
{
281
    char *cp;
281
    char *cp;
282
    int len;
282
283
283
    tp->th_opcode = htons((u_short) request);
284
    tp->th_opcode = htons((u_short) request);
284
    cp = (char *)&(tp->th_stuff);
285
    cp = (char *)&(tp->th_stuff);
285
    strcpy(cp, name);
286
    len = strlen(name);
286
    cp += strlen(name);
287
    memcpy(cp, name, len);
288
    cp += len;
287
    *cp++ = '\0';
289
    *cp++ = '\0';
288
    strcpy(cp, mode);
290
    len = strlen(mode);
289
    cp += strlen(mode);
291
    memcpy(cp, mode, len);
292
    cp += len;
290
    *cp++ = '\0';
293
    *cp++ = '\0';
291
    return (cp - (char *)tp);
294
    return (cp - (char *)tp);
292
}
295
}

Return to bug 375157