Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/mit/lua/dist/src Add a coverity annotation; string ...



details:   https://anonhg.NetBSD.org/src/rev/a82dcd265d74
branches:  trunk
changeset: 811141:a82dcd265d74
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 14 01:49:46 2015 +0000

description:
Add a coverity annotation; string bytes follow the struct. It would be
better to add a char bytes[]; at the end of the struct.

diffstat:

 external/mit/lua/dist/src/lobject.h |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r ee4e891517f6 -r a82dcd265d74 external/mit/lua/dist/src/lobject.h
--- a/external/mit/lua/dist/src/lobject.h       Wed Oct 14 01:33:32 2015 +0000
+++ b/external/mit/lua/dist/src/lobject.h       Wed Oct 14 01:49:46 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lobject.h,v 1.4 2015/10/08 13:21:00 mbalmer Exp $      */
+/*     $NetBSD: lobject.h,v 1.5 2015/10/14 01:49:46 christos Exp $     */
 
 /*
 ** Id: lobject.h,v 2.111 2015/06/09 14:21:42 roberto Exp 
@@ -343,7 +343,7 @@
 ** Get the actual string (array of bytes) from a 'TString'.
 ** (Access to 'extra' ensures that value is really a 'TString'.)
 */
-#define getaddrstr(ts) (cast(char *, (ts)) + sizeof(UTString))
+#define getaddrstr(ts) (/*coverity[overrun]*/cast(char *, (ts)) + sizeof(UTString))
 #define getstr(ts)  \
   check_exp(sizeof((ts)->extra), cast(const char*, getaddrstr(ts)))
 



Home | Main Index | Thread Index | Old Index