mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2026-08-09 06:33:41 +00:00
41 lines
1.6 KiB
JSON
41 lines
1.6 KiB
JSON
{
|
|
"ENTRY": "FreeRTOS_CLIProcessCommand",
|
|
# Bound the input command string to an acceptable value to test the memory
|
|
# safety of the funtion. The input string is compared against a pre-registered list of commands of
|
|
# finite length so a higher length will add to the runtime to the proof but will not add much value
|
|
# to test the memory safety of the function.
|
|
"CLI_INPUT_MAX_LENGTH": "256",
|
|
# Output length is limited to sufficient value inorder to check for all buffer overflows when CLI writes
|
|
# error logs to output buffer.
|
|
"CLI_OUTPUT_MAX_LENGTH": "32",
|
|
"CBMCFLAGS":
|
|
[
|
|
"--unwind 2",
|
|
# Loop in strncpy is bounded to maximum length of the outputbuffer to which the error string is copied.
|
|
# prvGetNumberOfParameters is used to count number of parameters separated by whitespaces, the loop unwinding
|
|
# is bounded by maximum length of the input buffer.
|
|
"--unwindset strlen.0:10,strncmp.0:10,strncpy.0:{CLI_OUTPUT_MAX_LENGTH},prvGetNumberOfParameters.0:{CLI_INPUT_MAX_LENGTH}"
|
|
],
|
|
|
|
"OBJS":
|
|
[
|
|
"FreeRTOS_CLIProcessCommand_harness.goto",
|
|
"$(FREERTOS)/../FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.goto"
|
|
],
|
|
"DEF":
|
|
[
|
|
"_CONSOLE",
|
|
"_CRT_SECURE_NO_WARNINGS",
|
|
"__free_rtos__",
|
|
# Pass the flags for maximum input and output length to test inorder to bound inputs within this limit.
|
|
"CLI_INPUT_MAX_LENGTH={CLI_INPUT_MAX_LENGTH}",
|
|
"CLI_OUTPUT_MAX_LENGTH={CLI_OUTPUT_MAX_LENGTH}"
|
|
],
|
|
|
|
"INC":
|
|
[
|
|
"$(FREERTOS)/../FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI"
|
|
]
|
|
}
|
|
|