-
Notifications
You must be signed in to change notification settings - Fork 253
Labels
bugsecurityunit-testTickets related to the OSAL unit testing (functional and/or coverage)Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone
Description
Is your feature request related to a problem? Please describe.
CodelQL security warnings against following code:
Line 60 in 09a2c5e
| if ((fp = fopen(Filename, "w"))) |
Lines 102 to 124 in 09a2c5e
| if ((fp = fopen(Filename, "w"))) | |
| { | |
| for (i = 0; i < Length; i += 16) | |
| { | |
| fprintf(fp, " %06lX: ", (unsigned long)i); | |
| for (j = 0; j < 16; j++) | |
| { | |
| if ((i + j) < Length) | |
| fprintf(fp, "%02X ", ((uint8 *)Memory)[i + j]); | |
| else | |
| fprintf(fp, " "); | |
| } | |
| fprintf(fp, " "); | |
| for (j = 0; j < 16; j++) | |
| { | |
| if ((i + j) < Length) | |
| fprintf(fp, "%c", isprint(((uint8 *)Memory)[i + j]) ? ((uint8 *)Memory)[i + j] : '.'); | |
| } | |
| fprintf(fp, "\n"); | |
| } | |
| fclose(fp); | |
| return (true); |
Describe the solution you'd like
https://github.com/nasa/elf2cfetbl/blob/6d1d12ea2d4ab7bcc7044f8e4c60a268d7a1f640/elf2cfetbl.c#L1455-L1464
Describe alternatives you've considered
None
Additional context
CodeQL analysis results
Requester Info
Jacob Hageman - NASA/GSFC
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugsecurityunit-testTickets related to the OSAL unit testing (functional and/or coverage)Tickets related to the OSAL unit testing (functional and/or coverage)