Search
j0ke.net Open Build Service
>
Projects
>
home:jg
>
curl
> 0005-curl-7.21.3-tftpd-buffer-overflow.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0005-curl-7.21.3-tftpd-buffer-overflow.patch of Package curl
--- curl-7.21.3/tests/server/tftpd.c.orig 2010-12-01 18:45:49.000000000 +0000 +++ curl-7.21.3/tests/server/tftpd.c 2010-12-16 13:19:13.489446036 +0000 @@ -1291,8 +1291,8 @@ pe->e_msg = strerror(error - 100); tp->th_code = EUNDEF; /* set 'undef' errorcode */ } - strcpy(tp->th_msg, pe->e_msg); length = (int)strlen(pe->e_msg); + memcpy(tp->th_msg, pe->e_msg, length + 1); tp->th_msg[length] = '\0'; length += 5; if (swrite(peer, &buf.storage[0], length) != length)