Module Name: src
Committed By: christos
Date: Wed Oct 14 01:49:46 UTC 2015
Modified Files:
src/external/mit/lua/dist/src: lobject.h
Log Message:
Add a coverity annotation; string bytes follow the struct. It would be
better to add a char bytes[]; at the end of the struct.
To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/mit/lua/dist/src/lobject.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/mit/lua/dist/src/lobject.h
diff -u src/external/mit/lua/dist/src/lobject.h:1.4 src/external/mit/lua/dist/src/lobject.h:1.5
--- src/external/mit/lua/dist/src/lobject.h:1.4 Thu Oct 8 09:21:00 2015
+++ src/external/mit/lua/dist/src/lobject.h Tue Oct 13 21:49:46 2015
@@ -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 @@ typedef union UTString {
** 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)))