]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - common.h
patch from div0: clamp "ping" reply valies in 0..9999 to prevent misparsing in case...
[xonotic/darkplaces.git] / common.h
index cfff75b3400bdfd98a5728d3823be24cf4d89103..de7eb23804e3d5967812d0483f69dbe92d2c8934 100644 (file)
--- a/common.h
+++ b/common.h
@@ -228,6 +228,19 @@ char       *va(const char *format, ...);
 extern int dpsnprintf (char *buffer, size_t buffersize, const char *format, ...);
 extern int dpvsnprintf (char *buffer, size_t buffersize, const char *format, va_list args);
 
+// A bunch of functions are forbidden for security reasons (and also to please MSVS 2005, for some of them)
+// LordHavoc: added #undef lines here to avoid warnings in Linux
+#undef strcat
+#define strcat DO_NOT_USE_STRCAT__USE_STRLCAT_OR_MEMCPY
+#undef strncat
+#define strncat DO_NOT_USE_STRNCAT__USE_STRLCAT_OR_MEMCPY
+#undef strcpy
+#define strcpy DO_NOT_USE_STRCPY__USE_STRLCPY_OR_MEMCPY
+#undef strncpy
+#define strncpy DO_NOT_USE_STRNCPY__USE_STRLCPY_OR_MEMCPY
+//#undef sprintf
+//#define sprintf DO_NOT_USE_SPRINTF__USE_DPSNPRINTF
+
 
 //============================================================================