Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 351478
Collapse All | Expand All

(-)a/tests/server/tftpd.c (-3 / +4 lines)
Lines 1291-1299 static void nak(int error) Link Here
1291
    pe->e_msg = strerror(error - 100);
1291
    pe->e_msg = strerror(error - 100);
1292
    tp->th_code = EUNDEF;   /* set 'undef' errorcode */
1292
    tp->th_code = EUNDEF;   /* set 'undef' errorcode */
1293
  }
1293
  }
1294
  strcpy(tp->th_msg, pe->e_msg);
1295
  length = (int)strlen(pe->e_msg);
1294
  length = (int)strlen(pe->e_msg);
1296
  tp->th_msg[length] = '\0';
1295
1296
  /* we use memcpy() instead of strcpy() in order to avoid buffer overflow
1297
   * report from glibc with FORTIFY_SOURCE */
1298
  memcpy(tp->th_msg, pe->e_msg, length + 1);
1297
  length += 5;
1299
  length += 5;
1298
  if (swrite(peer, &buf.storage[0], length) != length)
1300
  if (swrite(peer, &buf.storage[0], length) != length)
1299
    logmsg("nak: fail\n");
1301
    logmsg("nak: fail\n");
1300
- 

Return to bug 351478