=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/sendbug/sendbug.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- src/usr.bin/sendbug/sendbug.c 2007/03/23 02:28:14 1.3 +++ src/usr.bin/sendbug/sendbug.c 2007/03/23 02:41:02 1.4 @@ -1,4 +1,4 @@ -/* $OpenBSD: sendbug.c,v 1.3 2007/03/23 02:28:14 deraadt Exp $ */ +/* $OpenBSD: sendbug.c,v 1.4 2007/03/23 02:41:02 ray Exp $ */ /* * Written by Ray Lai . @@ -279,7 +279,10 @@ if (blank && (sp = memchr(buf, '<', len)) != NULL) ep = memchr(sp, '>', len - (sp - buf + 1)); /* Length of string before comment. */ - copylen = ep ? sp - buf : len; + if (ep) + copylen = sp - buf; + else + copylen = len; if (atomicio(vwrite, dst, buf, copylen) != copylen) { int saved_errno = errno;