From 1eb1433cf32d174ac411d25f2a98018163bfca6d Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sat, 16 Feb 2002 19:44:18 +0000 Subject: Added some splint annotations from andreas. (This used to be commit 60e84540fd8c27975066f7c7984d30bc88f6da5f) --- source3/include/safe_string.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source3/include/safe_string.h') diff --git a/source3/include/safe_string.h b/source3/include/safe_string.h index 9f64bc44e3..487174dec3 100644 --- a/source3/include/safe_string.h +++ b/source3/include/safe_string.h @@ -21,6 +21,11 @@ #ifndef _SAFE_STRING_H #define _SAFE_STRING_H +#ifndef _SPLINT_ /* http://www.splint.org */ + +/* Some macros to ensure people don't use buffer overflow vulnerable string + functions. */ + #ifdef strcpy #undef strcpy #endif /* strcpy */ @@ -36,6 +41,8 @@ #endif /* sprintf */ #define sprintf __ERROR__XX__NEVER_USE_SPRINTF__; +#endif /* !_SPLINT_ */ + #define pstrcpy(d,s) safe_strcpy((d), (s),sizeof(pstring)-1) #define pstrcat(d,s) safe_strcat((d), (s),sizeof(pstring)-1) #define fstrcpy(d,s) safe_strcpy((d),(s),sizeof(fstring)-1) -- cgit