random behavior of a simple cat|dd pipe

2010-04-14 Thread Paul Stoeber
The command cat /dev/zero | dd bs=1000 count=2 doesn't always produce the desired number of bytes. Is this supposed to happen? # cat bug t=`mktemp` for i in `jot 100`; do cat /dev/zero | dd bs=1000 count=2 > /dev/null 2> $t grep -q '^2+0 records in' $t || cat $t

Re: odd code in traceroute.c

2009-07-03 Thread Paul Stoeber
> I've tweaked freebsd's fix so that it really ... ... leaks memory! The following diff maybe has a higher probability of being right... Index: traceroute.c === RCS file: /cvs/src/usr.sbin/traceroute/traceroute.c,v retrieving revisi

odd code in traceroute.c

2009-07-03 Thread Paul Stoeber
The problem reported in http://www.freebsd.org/cgi/query-pr.cgi?pr=612 was fixed in openbsd's src/usr.sbin/traceroute/traceroute.c revision 1.5. Later the same problem was reported in http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=2701 offering an inferior fix (sloppy arit

Re: cwm - handle the PAspect flag

2009-06-26 Thread Paul Stoeber
Prevent overflow in (w + n * wi) and (h + n * hi). This diff supersedes the previous one. I grant this diff to the public domain. Index: mousefunc.c === RCS file: /cvs/xenocara/app/cwm/mousefunc.c,v retrieving revision 1.12 diff -u

cwm - handle the PAspect flag

2009-06-23 Thread Paul Stoeber
This diff supersedes http://marc.info/?l=openbsd-bugs&m=124471413424140 and attempts to handle the PAspect flag. The output of egrep '__int(32|64)_t;' /usr/src/sys/arch/*/include/_types.h seems to indicate that 'long long' is twice as big as 'int' on all supported platforms. The

making struct __sFILE editable

2009-06-08 Thread Paul Stoeber
This is a recipe for bringing the system into a state where the FILE type is opaque for libc users (unless they -D_EXPOSE__sFILE). 1. Apply the attached diff. 2. cd /usr/src/lib/libc && make && make install 3. Do step 3 of release(8). After that transition, I changed "short _file