Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pcs: Try to trap ADAM_USER buffer overflow
ADAM_USER is being copied into a fixed size buffer. There are traps in place for this except the buffer being used to report the error was only 100 characters in size and was being asked to include the ADAM_USER definition in the message. If ADAM_USER fitted inside a buffer of size MAXPATH sprintf was then being used to fill a buffer of size MAXPATH with the rendezvous file name which is ADAM_USER/taskname_portnum where ADAM_USER can be up to MAXPATH and taskname can be 32 characters. The rendezvous buffer is now sized to accept the file name as well as ADAM_USER and in addition the sprintf is converted to a snprintf to trap for buffer overflow and abort if the (now 1024 but before a recent patch was only 100) path is too long. This fixes random Aborts from OSX if you happen to set your own ADAM_USER to just the wrong size.
- Loading branch information