aklog: Fix overflows in auth_to_path
authorSimon Wilkinson <sxw@your-file-system.com>
Sat, 2 Mar 2013 12:04:46 +0000 (12:04 +0000)
committerJeffrey Altman <jaltman@your-file-system.com>
Sun, 10 Mar 2013 03:16:01 +0000 (19:16 -0800)
commit788a6b67a088e2565c3b47ecb6e594a7b15f2757
tree7a7ed9cad820af28861e89de89177e6abec4a9b5
parent95cd5b1d950ecb820179e4279b8570d8ad6780f5
aklog: Fix overflows in auth_to_path

In the auth_to_path routine, don't use strcpy and strcat when
working with the fixed length pathtocheck buffer. Instead, use
strlcpy and strlcat to ensure that all string operations fit within
the buffer limits.

Caught by coverity (#985762)

Change-Id: I66ae11e1f49c66574d457fd79e97dd647ac98a73
Reviewed-on: http://gerrit.openafs.org/9444
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