From: res@colnet.cmhnet.org (Rob Stampfli)
Subject: wmgr memory leak fixed
Summary: memory leak in the 3B1 3.51 version of /etc/wmgr found and fixed
Organization: Little to None
Date: Sun, 10 Jan 1993 16:27:56 GMT

Some weeks ago, there was a thread complaining about the memory leak in
the /etc/wmgr program.  It could be circumvented by killing the program
and respawning it manually, but changing console windows caused the program
to grow incrementally each time this was done.

I have found and fixed the problem in the 3.51 version of the wmgr.  Because
this program is so arcane, I am going to go ahead and post the entire corrected
executable of wmgr below without trying to obtain permission first.  To extract
it, remove this portion of the message and feed the rest into sh.  (I wonder
how many of you will really have the balls to just do it instead of trying to
figure out what the script does first.)  To install, do the following from
the console:
	sh <whereever you saved the bottom part of this msg>
	sum wmgr
	(15283 12 wmgr)
	su root
	mv /etc/wmgr /etc/wmgr.old
	mv wmgr /etc
	ps -e | grep wmgr
	kill <the wmgr pid>
	/etc/wmgr

This version of wmgr has been running on my 3.51 system, but has not been
tested on anything earlier.

Incidently the program below was sharked.  Shark was published in the
obsfucated code contest several years back and is a delightful little
program.  If you do take the time to wade through the obsfucated shell
script, I guarantee it will be an education about the shell command
language.
-- 
Rob Stampfli  rob@colnet.cmhnet.org      The neat thing about standards:
614-864-9377  HAM RADIO: kd8wk@n8jyv.oh  There are so many to choose from.
=-=-=-=-=-=-=-= CLIP -=-=-=-= CLIP -=-=-=-= CLIP -=-=-=-= CLIP -=-=-=-=-=-=-=
#!/bin/sh
#
# GENTLE READER -- Here is the material you requested.  Write this message
#	to a file (no headers!) and then, in the directory you want the
#	material to appear, run "sh file".
#
# [un]shark: By James A. Woods.
# Seed planted by Karl Fox; code intensified by Paul Eggert.
#
# "Cleverly he dialed from within." -- D. Van Vliet, "Trout Mask Replica"
#
PATH=$PATH:. a=atob m=unshark z=zcat
r="rm -f $a $m* $z" v="cc -o $z $m.c"
trap "$r;exit 1" 1 2 13 15
echo decoding...
(:|compress|btoa|$a|$z)2>$m>&2||(sed '1,9s/./#define & /
s/@/[w]/g
s/C/char /g
s/I/;if(/g
s/W/;while(/g
s/Y/%lx /g
s/}/;}/g'>$m.c<<_&&
FX,perror("$m bite: resend"),1;
GgetC()
H(w=g())
K[69001]
PputC
Q256
U*p
Xreturn 0
Zw=QWw--)t@=0
#include<stdio.h>
long M,N,c,f,m,o,r,s,w;y(l){o^=l;m+=l+1;f=f*2+l+(f>>31&1)}int
O,S,e,i,k,n,q,t K;b(g){k=4Wg<k)y(P((C)(w>>--k*8)&255));w=0}CD K,h
K;main(g,V)C**V;{I**V-97)X,a()WG-10)W(g=G)+1&&g-'x')if(g-10)
{I4<k)b(0)Ig>32&g<'v')w=w*85+g-33,++k;else{Ig-'z'|k)F
w=0;k=5}}WG-78)Iscanf("%ldYEYSYRY",&M,&N,&c,&s,&r)-5)F
IM){b(g=3-(M-1&3))Wg--)y(0)}I(M-N|c-o|s-m|r-f)&4294967295)F X}long
g(){CUIm<f&n<k&&(m=(1l<<++n)-1)||O>=S){O=0;S=fread(D,1,n,stdin)*8IS<8)X-1;
S-=n-1}p=D+O/8;q=O&7;O+=n;X,(1<<8-q)-1&U>>q|m&((15<n+q)U[2]*Q|p[1]&255)<<8-q}
a(){CU=D+Q;G;G;k=G;e=k>>7&1;k&=31Ik>16)F
Z,h@=w;n=8;f=Q+e;i=o=HIo<0)X,1;P(i)WH+1){Iw==Q&e){Z;m=n=8;f=QIH<0)X}
c=wIw>=f)U++=i,w=oWw>=Q)U++=h@,w=t@;P(i=h@)Wp>D+Q)P(*--p)
I(w=f)<1l<<k)t@=o,h[f++]=i;o=c}X}
_
($v||$v -Mh)&&ln $z $a)&&$a<<\w>$m-&&$z<$m->$m&&tar xvf $m&&$r
xbtoa Begin
+.\L;g749-TV0,R#SS[maKVAULCb&LR!>Aq%1iLdC6X9Hj$\nF4bAc8,K:00'5PgR5m%=N)DYjAcq*
3:N#NWZlJ0LfVpCu#K*iVk[&DBI808%t!eA&n-pOL^j<3AHJ-?0B:b/IEO$OBY&/Z*c0L7u@FNWO8F
-(4jXBV1^"Q=r+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