adding security misc from Vx7 to 6.9 (original files from vx7) (#5)

Co-authored-by: neelimap <neelimaps@neominds.in>
Reviewed-on: http://13.234.246.121:3000/Neominds/ossl35vx69/pulls/5
Reviewed-by: Siddhant Singh <siddhant.singh@neominds.in>
Co-authored-by: Neelima P S <neelima.ps@neominds.in>
Co-committed-by: Neelima P S <neelima.ps@neominds.in>
This commit is contained in:
2026-07-30 18:09:00 +05:30
committed by neelimap
co-authored by neelimap
parent 368226261b
commit 122392cfc0
60 changed files with 9586 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
/* banned.h - header file listing banned APIs in VxWorks */
/*
* Copyright (c) 2019-2021 Wind River Systems, Inc.
*
* The right to copy, distribute, modify, or otherwise make use
* of this software may be licensed only pursuant to the terms
* of an applicable Wind River license agreement.
*/
#ifndef __INCbannedh
#define __INCbannedh
/* includes */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
#define _WRS_BANNED_TEXT(bannedFunc, recommendedFunc) \
(bannedFunc " is now banned, consider using " recommendedFunc " instead")
#ifdef __clang__
#define _WRS_BANNED_MSG(msg) __attribute__((diagnose_if(1, msg, "error")));
#else
#define _WRS_BANNED_MSG(msg) __attribute__((error(msg)))
#endif
#define _WRS_BANNED(bannedFunc, recommendedFunc) \
_WRS_BANNED_MSG(_WRS_BANNED_TEXT(bannedFunc, recommendedFunc))
char * strcpy (char * a, const char * b) _WRS_BANNED("strcpy", "strncpy_s");
char * strcat (char * a, const char * b) _WRS_BANNED("strcat", "strncat_s");
char * mktemp (char *tmplate) _WRS_BANNED("mktemp", "mkstemp or mkdtemp");
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __INCbannedh */