Branch: refs/heads/master
Home: https://github.com/Starlink/starlink
Commit: 7e07c379fd002cbbe97f8b2a3e9b52df9b6a83be
https://github.com/Starlink/starlink/commit/7e07c379fd002cbbe97f8b2a3e9b52df9b6a83be
Author: Tim Jenness <[log in to unmask]>
Date: 2012-09-14 (Fri, 14 Sep 2012)
Changed paths:
M libraries/pcs/msp/msp.c
Log Message:
-----------
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.
|