kauth: Fix overflow when writing ticket file
authorSimon Wilkinson <sxw@your-file-system.com>
Tue, 26 Feb 2013 22:40:04 +0000 (22:40 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Wed, 27 Feb 2013 20:42:01 +0000 (12:42 -0800)
commita332ce9d0e87fab55f3d286690026fe075f624dd
tree67e08777e1ba6daab42b4131b924a43aa33c453a
parenta5324a6bb6ff127997c48b54f8ad0e98189f3f1e
kauth: Fix overflow when writing ticket file

krb_write_ticket_file uses a fixed length buffer to store the name
of the ticket file, but copies into this from an environment variable.

Remove the fixed length buffer, and use a mixture of the variable
itself, and dynamically allocated strings.

Caught by coverity (#985909)

Change-Id: I997fd1812c45e730db39497a27a5e168f102fee5
Reviewed-on: http://gerrit.openafs.org/9294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
src/kauth/krb_tf.c