freebsd-ports/mail/autorespond/files/patch-autorespond.c
Peter Pentchev 0dcdd0d4ce Fix an off-by-one error in strncpy(3) usage.
Unquote the comment variable.

PR:		55700
Submitted by:	Alex Dupre <sysadmin@alexdupre.com>
2003-08-29 16:04:41 +00:00

11 lines
386 B
C

--- autorespond.c.orig Mon Aug 18 14:41:33 2003
+++ autorespond.c Mon Aug 18 14:42:14 2003
@@ -572,7 +572,7 @@
if ( *rpath == '$' )
{
rpath = safe_malloc( strlen(TheUser) + strlen(TheDomain) + 2);
- strncpy( rpath, TheUser, strlen(TheUser) );
+ strncpy( rpath, TheUser, strlen(TheUser) + 1 );
strncat( rpath, "@", 1 );
strncat( rpath, TheDomain, strlen(TheDomain) );
}