]> git.michaelhowe.org Git - packages/o/openafs.git/commit
libprot: add pr_PrintContEntry function
authorMichael Meffie <mmeffie@sinenomine.net>
Wed, 18 Feb 2015 02:11:50 +0000 (21:11 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 20 Nov 2015 13:25:04 +0000 (08:25 -0500)
commit687c60bdec2d886b866b8a0cbfa975a20106f9ab
tree72a1168e3940fd50d0c30593ef6d4816f4b060c9
parent626f2ecf03c069dbd66402a98dd3eb63bfe8e701
libprot: add pr_PrintContEntry function

A continuation entry (struct contentry) contains 39 id elements, however
a regular entry (struct prentry) contains only 10 id elements. Attempting
to access more than 10 elements of a regular entry is undefined
behavior.

Add a new function to safely print continuation entries and change
pr_PrintEntry to avoid accessing the entries array out of bounds.

The pr_PrintEntry function is at this time only used by the prdb_check
and ptclient debugging utilities.

Reviewed-on: http://gerrit.openafs.org/11750
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 121ac2d939e19741986ddfbd387b5310c40edd0d)

Change-Id: Ifaa5ba1df0e40ae03e5a80fa7f0490196e7e4369
Reviewed-on: http://gerrit.openafs.org/12102
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/ptserver/display.c
src/ptserver/display.h