crypto: _afscrypto_strdup must copy trailing NUL
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 21 Feb 2013 16:18:26 +0000 (16:18 +0000)
committerDerrick Brashear <shadow@your-file-system.com>
Tue, 26 Feb 2013 11:49:58 +0000 (03:49 -0800)
commit961fcc63640ee95e9b1cfebe92d71e3b9f3d9f52
tree39ec3d7ad009b243b03631146eca7627c6b7e1da
parent00601179625ffb71461bbcc46629791895cf4793
crypto: _afscrypto_strdup must copy trailing NUL

The _afscrypto_strdup helper function was failing to alloc enough
space for the string's trailing NUL, and to copy that NUL over.

Caught by coverity (#985580)

Change-Id: I61c9a96275a79682a9521846ab52615ea5bc061d
Reviewed-on: http://gerrit.openafs.org/9263
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
src/crypto/hcrypto/kernel/alloc.c