From: Oliver Kurth Date: Wed, 1 Apr 2020 18:31:36 +0000 (-0700) Subject: Add a Coverity annotation. X-Git-Tag: stable-11.2.0~271 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cbdf3a6e2cb23a7673fe19b2a3f888714095019;p=thirdparty%2Fopen-vm-tools.git Add a Coverity annotation. The Coverity scan of open-vm-tools reports an out-of-bounds access issue in Util_BacktraceWithFunc. This is intentional, to compute the base pointer for a stack trace. --- diff --git a/open-vm-tools/lib/user/utilBacktrace.c b/open-vm-tools/lib/user/utilBacktrace.c index dca33d267..e1259606f 100644 --- a/open-vm-tools/lib/user/utilBacktrace.c +++ b/open-vm-tools/lib/user/utilBacktrace.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2013-2019 VMware, Inc. All rights reserved. + * Copyright (C) 2013-2020 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -438,6 +438,7 @@ Util_BacktraceWithFunc(int bugNr, // IN: } else { outFunc(outFuncData, "Backtrace for bugNr=%d\n",bugNr); } + /* coverity[ptr_arith] */ UtilBacktraceFromPointerWithFunc(&x[-2], outFunc, outFuncData); #endif }