]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Reallocate memory in aklog for the AFS ID string
authorRuss Allbery <rra@stanford.edu>
Tue, 6 Apr 2010 23:31:37 +0000 (16:31 -0700)
committerRuss Allbery <rra@debian.org>
Thu, 8 Apr 2010 20:19:00 +0000 (13:19 -0700)
commit9761e8aa20b5de36d53f9528ac5425d50f3f3492
tree7021f3e902593c498593ca7ea3e0d33f61fb49f1
parent45a6087e167e56edc6f5fb49336bb28fbf82c055
Reallocate memory in aklog for the AFS ID string

aklog was previously writing the magic AFS ID string into previously
alloated memory with sprintf, but the variable in question was only
as long as the username, so this code could overwrite memory and lead
to heap corruption.  Free previously allocated memory and use
afs_asprintf to format the AFS ID string instead.

Change-Id: I7649864817340764c39c176606a9a543c10983c9
Reviewed-on: http://gerrit.openafs.org/1706
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8d41bc24c51018a25eac49b3403cbb276713e1ad)
src/aklog/aklog.c