in reply to Uncontrolled Format String - Checkmarx issue
I don't know about checkmarx, but I suspect the line should either be:
print RPT " Number of Rejected Records : $errcnt\n"; # - or - printf RPT " Number of Rejected Records : %s\n", $errcnt;
By the way, you should check your opens for errors, see "open" Best Practices, and also I suggest you chomp $content before using it as a number, as that's cleaner.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Uncontrolled Format String - Checkmarx issue
by Rishi2Monk (Novice) on Dec 28, 2022 at 11:54 UTC | |
by Corion (Patriarch) on Dec 28, 2022 at 12:00 UTC | |
by Rishi2Monk (Novice) on Dec 28, 2022 at 12:24 UTC | |
by marto (Cardinal) on Dec 28, 2022 at 12:44 UTC | |
by Corion (Patriarch) on Dec 28, 2022 at 12:39 UTC | |
by haukex (Archbishop) on Dec 28, 2022 at 15:24 UTC |