Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B gary ryu #1

Open
wants to merge 36 commits into
base: accepted/tizen_common
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
e572f50
Modified Makefile & mingw64.mak file
Jul 1, 2021
207cbad
mingw64 Header folders
Jul 6, 2021
69536ff
build.bat file changed
Jul 8, 2021
a3d6d5f
commit .gitignore
Jul 8, 2021
988a241
Fix something
Jul 8, 2021
4d83064
Change folder configuration for workshop
Jul 8, 2021
bd2c82d
Below items are added
Jul 8, 2021
3ad0f60
Create README.md
GaryRyu Jul 12, 2021
a33f7ed
Fixed some issues
Jul 13, 2021
9ad98a0
Changed settings.json
Jul 14, 2021
d0146af
Change build script & makefile for MSYS2 + MinGW
Aug 2, 2021
9bd819c
- Modified project, configuration templates, PaYC configuration, and …
Aug 3, 2021
e603c9c
- Some files were not changed for newly added checkers. Those files a…
Aug 5, 2021
b7a1355
- Changed analysis options file for Polyspace Bug Finder Server
Aug 6, 2021
1513341
Added Build options file for Dos2Unix
Aug 6, 2021
5831623
Changed settings.json file for PaYC build options file
Aug 6, 2021
f7d5662
Added scripts and json files for building dos2unix in VS Code
Aug 7, 2021
b5ec892
Added Other analysis options for -code-behavior-specifications
Aug 7, 2021
d28ad49
Added -code-behavior-specifications in 'Other analysis options' in se…
Aug 7, 2021
bc80b77
Remove build options in task.json file
Aug 7, 2021
74f1550
File name is changed.
Aug 20, 2021
0ba1c0b
Polyspace options files are added for R2021b
Jan 27, 2022
72443ca
STR_STD_LIB is added for R2021b
Jan 28, 2022
79b5b6a
Add missing file (psprj)
Jan 28, 2022
775b994
Update .gitignore file
Jan 28, 2022
4239461
- Add setting files to configure HMC Secure Coding for Embedded C for…
Apr 7, 2022
5d53016
added PSPRJ files for R2022a
Apr 19, 2022
a1de3de
Added settings.json in ignore list
Apr 19, 2022
0e96cf7
C-MSC-002 (MAC사용시 8바이트 이상 사용)를 위해 FORBIDDEN_FUNC 체커 설정 추가
Jul 19, 2022
9a5342a
C-MSC-002 (MAC사용시 8바이트 이상 사용)를 위해 FORBIDDEN_FUNC 체커 설정 추가
Jul 19, 2022
ae9767e
dos2unix, unix2dos 모듈 모두 빌드하는 빌드 커맨드 추가
Jul 19, 2022
047e3e3
- Developed the new configuration for R2022b
Sep 21, 2022
2709602
- Developed the new configuration for R2022b
Sep 21, 2022
4883ad2
- Changed xml format for changes in R2022b
Sep 22, 2022
f20cfed
A .zip file is added to ignore
Oct 13, 2022
0051531
Merge of https://github.com/GaryRyu/dos2unix/tree/accepted/tizen_comm…
the-moog Jan 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
HMC_Secure_Coding_C_R2021a.zip
BF_Result/
*.psprj
HMC_Secure_Coding_C_R2021b.zip
/dos2unix/.vscode/settings.json
HMC_Secure_Coding_C_R2022b.zip
HMC_Secure_Coding_CPP_R2022b.zip
PaYC_Configuration_R2022b.json
Configuration_for_HMC_Seucre_Coding_Guidelines.zip
20 changes: 20 additions & 0 deletions CustomTemplateForDos2Unix/BuildOptionsForPaYCAndDos2unix.opts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-lang c
-target x86_64
-c-version c11
-compiler gnu8.x
-I C:\Workspace\Polyspace\dos2unix\mingw64\lib\gcc\x86_64_w64-mingw32\8.1.0\include\
-I C:\Workspace\Polyspace\dos2unix\mingw64\lib\gcc\x86_64_w64-mingw32\8.1.0\include-fixed\
-I C:\Workspace\Polyspace\dos2unix\mingw64\x86_64-w64-mingw32\include\
-D VER_REVISION="6.0"
-D VER_DATE="2012-05-06"
-D VER_AUTHOR="Erwin Waterlander"
-D __x86_64
-D __MINGW64__
-D _WIN32
-D WIN32
-D DEBUG=0
-D NO_CHOWN
-D NO_MKSTEMP
-D D2U_UNICODE
-D _DLGSH_INCLUDED_
-U __BLOCKS__
175 changes: 175 additions & 0 deletions CustomTemplateForDos2Unix/CustomTemplateForDos2Unix.cft
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- DO NOT EDIT THIS FILE: Some changes can cause Polyspace products to fail. -->
<polyspace_template name="dos2unixFromTemplate" language="C" author="garyryu" version="1.0" date="06/07/2021" path="file:/C:/Workspace/Polyspace/dos2unix/CustomTemplateForDos2Unix/CustomTemplateForDos2Unix.cft" rev="1.1">
<include>
<file path="file:/C:/Workspace/Polyspace/mingw64/lib/gcc/x86_64_w64-mingw32/8.1.0/include/" order="0"/>
<file path="file:/C:/Workspace/Polyspace/mingw64/lib/gcc/x86_64_w64-mingw32/8.1.0/include-fixed/" order="1"/>
<file path="file:/C:/Workspace/Polyspace/mingw64/x86_64-w64-mingw32/include/" order="2"/>
</include>
<module name="Module_1" path="file:/C:/Workspace/Polyspace/dos2unixFromTemplate/Module_1/" isactive="true">
<optionset name="dos2unixFromTemplate" isactive="true">
<description>Based on Polyspace Configuration Template for HMC Secure Coding Guidelines

- # of Enabled CERT-C : 93
- # of Enabled Defects related to CWE : 101
- Code Metrics are Enabled

* Target processor type : x86_64
* Include patchs are specifed :
- mingw64 path\lib\gcc\x86_64_w64-mingw32\8.1.0\include
- mingw64 path\lib\gcc\x86_64_w64-mingw32\8.1.0\include-fixed
- mingw64 path\x86_64-w64-mingw32\include

* Multipe macros are defined :
VER_REVISION=“6.0”
VER_DATE=“2012-05-06”
VER_AUTHOR="Erwin Waterlander"
__x86_64
WIN32
_WIN32
__MINGW64__
D2U_UNICODE
_DLGSH_INCLUDED_
NO_CHOWN
DEBUG=0
NO_MKSTEMP</description>
<option flagname="*_cert-c">true</option>
<option flagname="*_checkers-selection-file">true</option>
<option flagname="*_checkers_preset">custom</option>
<option flagname="*_other">-code-behavior-specifications C:\Workspace\Polyspace\HMC_Secure_Coding_C_R2021a\forbidden_debug_func.xml</option>
<option flagname="-D">
<element>VER_REVISION=&quot;6.0&quot;</element>
<element>VER_DATE=&quot;2012-05-06&quot;</element>
<element>VER_AUTHOR=&quot;Erwin Waterlander&quot;</element>
<element>__x86_64</element>
<element>__MINGW64__</element>
<element>_WIN32</element>
<element>WIN32</element>
<element>DEBUG=0</element>
<element>NO_CHOWN</element>
<element>NO_MKSTEMP</element>
<element>D2U_UNICODE</element>
<element>_DLGSH_INCLUDED_</element>
</option>
<option flagname="-I">
<element>file:/C:/Workspace/Polyspace/mingw64/lib/gcc/x86_64_w64-mingw32/8.1.0/include/</element>
<element>file:/C:/Workspace/Polyspace/mingw64/lib/gcc/x86_64_w64-mingw32/8.1.0/include-fixed/</element>
<element>file:/C:/Workspace/Polyspace/mingw64/x86_64-w64-mingw32/include/</element>
</option>
<option flagname="-bug-finder">true</option>
<option flagname="-c-version">c11</option>
<option flagname="-cert-c">from-file</option>
<option flagname="-checkers">
<element>BAD_EQUAL_EQUAL_USE</element>
<element>BAD_EQUAL_USE</element>
<element>BAD_FILE_ACCESS_MODE_STATUS</element>
<element>BAD_PLAIN_CHAR_USE</element>
<element>BAD_UMASK</element>
<element>BITWISE_NEG</element>
<element>CHROOT_MISUSE</element>
<element>CONSTANT_OBJECT_WRITE</element>
<element>CRYPTO_CIPHER_CONSTANT_IV</element>
<element>CRYPTO_CIPHER_CONSTANT_KEY</element>
<element>CRYPTO_CIPHER_NO_DATA</element>
<element>CRYPTO_CIPHER_NO_FINAL</element>
<element>CRYPTO_CIPHER_NO_IV</element>
<element>CRYPTO_CIPHER_NO_KEY</element>
<element>CRYPTO_CIPHER_PREDICTABLE_KEY</element>
<element>CRYPTO_CIPHER_WEAK_CIPHER</element>
<element>CRYPTO_CIPHER_WEAK_MODE</element>
<element>CRYPTO_MD_BAD_FUNCTION</element>
<element>CRYPTO_MD_WEAK_HASH</element>
<element>CRYPTO_PKEY_NO_PEER</element>
<element>CRYPTO_PKEY_NO_PRIVATE_KEY</element>
<element>CRYPTO_PKEY_NO_PUBLIC_KEY</element>
<element>CRYPTO_PKEY_WEAK_PARAMS</element>
<element>CRYPTO_RSA_LOW_EXPONENT</element>
<element>CRYPTO_RSA_NO_BLINDING</element>
<element>CRYPTO_RSA_NO_PADDING</element>
<element>CRYPTO_RSA_WEAK_PADDING</element>
<element>CRYPTO_SSL_WEAK_PROTOCOL</element>
<element>DANGEROUS_PERMISSIONS</element>
<element>DATA_LENGTH_MISMATCH</element>
<element>DATA_RACE_ALL</element>
<element>DATA_RACE_STD_LIB</element>
<element>DATA_RACE</element>
<element>DEAD_CODE</element>
<element>DECL_MISMATCH</element>
<element>DOUBLE_DEALLOCATION</element>
<element>DOUBLE_RESOURCE_OPEN</element>
<element>ERRNO_NOT_CHECKED</element>
<element>FILE_EXPOSURE_TO_CHILD</element>
<element>FLOAT_ABSORPTION</element>
<element>FLOAT_OVFL</element>
<element>FLOAT_STD_LIB</element>
<element>FORBIDDEN_FUNC</element>
<element>FREED_PTR</element>
<element>INCORRECT_INDENTATION</element>
<element>INT_STD_LIB</element>
<element>INVALID_ENV_POINTER</element>
<element>LOCAL_ADDR_ESCAPE</element>
<element>MEMSET_INVALID_VALUE</element>
<element>MEM_STD_LIB</element>
<element>MISSING_ERRNO_RESET</element>
<element>MISSING_FREED_PTR_RESET</element>
<element>MISSING_SWITCH_BREAK</element>
<element>MISSING_SWITCH_CASE</element>
<element>NARROW_WIDE_STR_MISUSE</element>
<element>NON_INIT_PTR</element>
<element>NON_POSITIVE_VLA_SIZE</element>
<element>NON_SECURE_TEMP_FILE</element>
<element>OPERATOR_PRECEDENCE</element>
<element>OUT_BOUND_ARRAY</element>
<element>OUT_BOUND_PTR</element>
<element>OVERLAPPING_COPY</element>
<element>PATH_BUFFER_OVERFLOW</element>
<element>PTR_CAST</element>
<element>PUTENV_AUTO_VAR</element>
<element>RAND_SEED_CONSTANT</element>
<element>RAND_SEED_PREDICTABLE</element>
<element>RETURN_NOT_CHECKED</element>
<element>SEMICOLON_CTRL_STMT_SAME_LINE</element>
<element>SENSITIVE_HEAP_NOT_CLEARED</element>
<element>SENSITIVE_STACK_NOT_CLEARED</element>
<element>SIG_HANDLER_ASYNC_UNSAFE_STRICT</element>
<element>SIG_HANDLER_ASYNC_UNSAFE</element>
<element>SIG_HANDLER_SHARED_OBJECT</element>
<element>SIGN_CHANGE</element>
<element>STD_FUNC_ARG_MISMATCH</element>
<element>STR_FORMAT_BUFFER_OVERFLOW</element>
<element>STRING_FORMAT</element>
<element>STRLIB_BUFFER_OVERFLOW</element>
<element>STRLIB_BUFFER_UNDERFLOW</element>
<element>TAINTED_ARRAY_INDEX</element>
<element>TAINTED_INT_MOD</element>
<element>TAINTED_LOOP_BOUNDARY</element>
<element>TAINTED_MEMORY_ALLOC_SIZE</element>
<element>TAINTED_PTR_OFFSET</element>
<element>TAINTED_PTR</element>
<element>TAINTED_SIGN_CHANGE</element>
<element>TAINTED_STRING</element>
<element>TAINTED_VLA_SIZE</element>
<element>TEMP_OBJECT_ACCESS</element>
<element>TOO_MANY_VA_ARG_CALLS</element>
<element>UINT_CONV_OVFL</element>
<element>UINT_OVFL</element>
<element>UNCALLED_FUNC</element>
<element>UNPROTECTED_MEMORY_ALLOCATION</element>
<element>UNREACHABLE</element>
<element>UNSAFE_STD_CRYPT</element>
<element>UNSAFE_STD_FUNC</element>
<element>UNSAFE_STR_TO_NUMERIC</element>
<element>USELESS_WRITE</element>
<element>VA_ARG_INCORRECT_TYPE</element>
</option>
<option flagname="-checkers-selection-file">file:/C:/Workspace/Polyspace/HMC_Secure_Coding_C_R2021a/HMC_Secure_Coding_C_R2021a.xml</option>
<option flagname="-code-metrics">true</option>
<option flagname="-compiler">gnu8.x</option>
<option flagname="-guidelines">from-file</option>
<option flagname="-lang">C</option>
<option flagname="-misra3">from-file</option>
<option flagname="-target">x86_64</option>
<!-- ADVANCED TARGET OPTIONS -->
</optionset>
</module>
</polyspace_template>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-cert-cpp from-file
-autosar-cpp14 from-file
-checkers-selection-file C:\Workspace\Polyspace\HMC_Secure_Coding_CPP_R2022a\HMC_Secure_Coding_CPP_CERT_CPP_R2022a.xml
-checkers BAD_LOCK,BAD_PTR_SCALING,BLOCKING_WHILE_LOCKED,BREAKING_DATA_ENCAPSULATION,CATCH_FOR_GENERIC_EXCEPTION,CRITICAL_DATA_MEMBER_DECLARED_PUBLIC,DANGEROUS_STD_FUNC,DATA_LENGTH_MISMATCH,DESTROY_LOCKED,HARD_CODED_MEM_SIZE,INT_CONV_OVFL,INT_OVFL,LOCAL_ADDR_ESCAPE,MEM_LEAK,MEM_STD_LIB,NULL_PTR,OTHER_STD_LIB,OUT_BOUND_ARRAY,OUT_BOUND_PTR,PADDING_INFO_LEAK,PATH_BUFFER_OVERFLOW,PTR_TO_DIFF_ARRAY,PUBLIC_STATIC_FIELD_NOT_CONST,PUTENV_AUTO_VAR,RETURN_NOT_CHECKED,SIGN_CHANGE,SIZEOF_MISUSE,STD_FUNC_ARG_MISMATCH,STR_FORMAT_BUFFER_OVERFLOW,STR_STD_LIB,STRLIB_BUFFER_OVERFLOW,STRLIB_BUFFER_UNDERFLOW,TAINTED_ARRAY_INDEX,TAINTED_PTR,TAINTED_PTR_OFFSET,TAINTED_SIGN_CHANGE,TAINTED_STRING,THREAD_MEM_LEAK,THROW_FOR_GENERIC_EXCEPTION,UINT_CONV_OVFL,UINT_OVFL,UNPROTECTED_MEMORY_ALLOCATION,UNSAFE_STR_TO_NUMERIC
-code-behavior-specifications C:\Workspace\Polyspace\HMC_Secure_Coding_CPP_R2022a\critical_data_member.xml
Loading