aklog: Protect against overflows from cmdline
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 12:15:22 +0000 (12:15 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 10 Mar 2013 03:16:25 +0000 (19:16 -0800)
commit2902ef93976fd4baa1a1ed07f4940c5979702856
treebb66e49a3fc421bcedb8188f49c47eff97840092
parent19d2683d711f95165adc16fac765bb4a31c99043
aklog: Protect against overflows from cmdline

The cell, realm and path arrays are populated based on the user's
command line, and xlog_path is populated from their passwd map
entry. Protect against all of these overflowing, by making suitable
use of strlcpy and strlcat.

Caught by coverity (#985764, #985904)

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