<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Sat, 03 Aug 1985 10:10:00-EDT
From   : ABN.ISCAMS@USC-ISID.ARPA
Subject: LOCK Bug Unmasked

Netlandians,

A library file called LOCK.LBR was recently installed at SIMTEL20's
MICRO archives, shortly thereafter followed by a horrible bug warning
message (also in that archive).

I did some testing, disassembly, etc. (the source code will be available
shortly when I'm done - I DO believe in Public Domain source being released).
Only problem I can discover is:
If you LOCK a file twice, you gotta UNLOCK it twice!  LOCK properly
labels its locked files with an ASCII "Locked File" warning, but unfortunately
does NOT look at that warning (or maybe the author didn't WANT to check
that warning to permit double-LOCKing), and will gleefully lock the LOCKed
file again!  (Darn, forgot to check what happens if you LOCK twice using two
different keywords!)

Anyway, test results:  If you LOCK a file once (any kind of file), you can
UNLOCK it just fine with the same keyword.

If you LOCK a file twice (SAME keyword both times), you can UNLOCK it just
fine (using the SAME keyword both times).

Could not make it crash given the above circumstances.

Incidentally, LOCKing algorithm is quite simple - uses the scrambled buffer
toward the end of LOCK.COM against the target file data.  It ADDs the two
values, ANDs in 55H, does a RLCA, XORs it with another pointer character,
and then stuffs it away.

Regards,
David Kirschbaum
Toad Hall
ABN.ISCAMS@USC-ISID
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>