Closed rvillalob closed 4 years ago
Declarations match the use. lname holds the file name of the lock file which is the edited file name + ".lock~". locker is a static variable used to identify who is currently editing the file (user@hostname). Based on latest commit on maximum filename length (80 -> 256) , 512 is way too much.
In dolock, shouldn't the declaration be: lname[MAXNAME], locker[MAXLOCK + 1]...
Instead of: lname[MAXLOCK], locker[MAXNAME + 1]...
This causes the function to read an arbitrary 128 bytes from the file instead if 512, which I don't understand why.