From: Andrew Deason Date: Fri, 6 Aug 2010 18:01:51 +0000 (-0500) Subject: Include com_err.h in dumpstuff.c X-Git-Tag: debian/1.4.12.1+dfsg-3~4 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=317a725a8081feeda71a4bad30daff85836cde60;p=packages%2Fo%2Fopenafs.git Include com_err.h in dumpstuff.c src/volser/dumpstuff.c uses afs_error_message in its error reporting, but it does not include com_err.h, so it does not get the prototype for afs_error_message. The default return type for unprototyped functions is 'int', so the return value of afs_error_message can get truncated on platforms where sizeof(char*) > sizeof(int), causing a segfault whenever the result of afs_error_message is logged. This is a 1.4-only change. This was fixed in the 1.5 branch in the midst of the larger warning cleanup effort. Change-Id: Id3bcde20609130d8e4e393c6c8aae75682bcd966 Reviewed-on: http://gerrit.openafs.org/2526 Tested-by: Andrew Deason Tested-by: BuildBot Reviewed-by: Derrick Brashear Tested-by: Derrick Brashear (cherry picked from commit ebb6accf18cf3eeb6a99025ccf5228f979463d0e) --- diff --git a/src/volser/dumpstuff.c b/src/volser/dumpstuff.c index f8ff68d2c..69892548c 100644 --- a/src/volser/dumpstuff.c +++ b/src/volser/dumpstuff.c @@ -45,6 +45,7 @@ #include "dump.h" #include #include +#include #include "volser.h" #include "volint.h"