-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't workingmodernizationIssues related to C code modernizationIssues related to C code modernizationsecuritySecurity vulnerabilities and fixesSecurity vulnerabilities and fixes
Description
Priority: HIGH
File: Src/checkX.c
Function: checkout()
Discovered: During clang-tidy static analysis testing
Description: Multiple calls to fprintf() without bounds checking or security validation. clang-tidy identifies these as security risks that should use safer alternatives with length arguments or boundary checks.
Reproduction Steps:
- Run
clang-tidy Src/checkX.c -checks=clang-analyzer-security* - Multiple warnings about insecure fprintf() usage at lines 128, 135, 144, 150, 158
- Expected: Use fprintf_s() or similar bounded alternatives
Impact: Potential buffer overflow vulnerabilities in logging and output functions. Could be exploited if format strings are controlled by user input.
Proposed Fix: Replace fprintf() calls with safer alternatives:
/* Before (insecure) */
fprintf(fupdate, "%s[%d]: %s has repro > 15 of %d\n", ...);
/* After (secure) */
snprintf(buffer, sizeof(buffer), "%s[%d]: %s has repro > 15 of %d\n", ...);
fprintf(fupdate, "%s", buffer);
/* OR use fprintf_s if available */Original Bug ID: BUG-004
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingmodernizationIssues related to C code modernizationIssues related to C code modernizationsecuritySecurity vulnerabilities and fixesSecurity vulnerabilities and fixes