[S390] call home: fix string length handling
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Thu, 29 Oct 2009 14:04:11 +0000 (15:04 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Thu, 29 Oct 2009 14:05:12 +0000 (15:05 +0100)
commite8a79c9ec779168502402a8b834abf8cf38a325a
tree4d473feebe815ea3b76a21268e2642e748fb5e38
parent4a0fb4c44573759f878fc65f6ddbd46080748f8b
[S390] call home: fix string length handling

After copying uts->nodename to the static nodename array the static
version isn't necessarily zero termininated, since the size of the
array is one byte too short.
Afterwards doing strncat(data, nodename, strlen(nodename)); may copy
an arbitrary large amount of bytes.
Fix this by getting rid of the static array and using strncat with
proper length limit.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/sclp_async.c