Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

new tools + fixes #9

Merged
merged 14 commits into from
Apr 23, 2024
Merged

new tools + fixes #9

merged 14 commits into from
Apr 23, 2024

Conversation

dj1ch
Copy link
Owner

@dj1ch dj1ch commented Apr 23, 2024

No description provided.

@dj1ch dj1ch merged commit 9b0f023 into main Apr 23, 2024
}
fclose(file);
printf("Script saved to payload.dd!\n");
printf("Script saved!\n");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected
if (strlen(script) + strlen(scriptBuffer) + 1 <= sizeBytes) {
strcat(scriptBuffer, script);
} else {
printf("Script buffer is full. Exiting.\n");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected
if (strcmp(script, "EXIT") == 0) {
// append script line to buffer
if (strlen(script) + strlen(scriptBuffer) + 1 <= sizeBytes) {
strcat(scriptBuffer, script);

Check failure

Code scanning / devskim

If the combination of strings is larger than the destination buffer, strcat will cbuffer overflow the destination buffer Error

Banned C function detected (strcat)
// exit if command is "exit"
if (strcmp(script, "EXIT") == 0) {
// append script line to buffer
if (strlen(script) + strlen(scriptBuffer) + 1 <= sizeBytes) {

Check notice

Code scanning / devskim

If a string is missing a null terminator, strlen will read past the end of the buffer Note

Problematic C function detected (strlen)
// exit if command is "exit"
if (strcmp(script, "EXIT") == 0) {
// append script line to buffer
if (strlen(script) + strlen(scriptBuffer) + 1 <= sizeBytes) {

Check notice

Code scanning / devskim

If a string is missing a null terminator, strlen will read past the end of the buffer Note

Problematic C function detected (strlen)
return;
}

printf("\nWriting data to flash...\n");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected

// check if the length exceeds the available space
if (len > sizeBytes) {
printf("Error: Data exceeds available space :/\n");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected
void separate(const char *buffer, size_t buflen, char *array) {
// check if the buffer is empty
if (buflen == 0) {
printf("Buffer is empty.\n");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected
// erase memory at specified range
flash_range_erase(startAddress, sizeBytes);

printf("Done.\n");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected

// format the specified area
void format(void) {
printf("\nErasing flash...\n");

Check warning

Code scanning / devskim

These functions are historically error-prone and have been associated with a significant number of vulnerabilities. Most of these functions have safer alternatives, such as replacing 'strcpy' with 'strlcpy' or 'strcpy_s'. Warning

Banned C function detected
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant