Commit 682c27a
authored
Fix husk -o/-j argument bounds check (#2658)
The guard "i < commandLine.size() - 2" was off by one and dropped
the valid trailing pair (e.g. {"-o", "out.exr"} of size 2). It also
underflows when commandLine.size() < 2, since size() is unsigned.
Rewrote as "i + 1 < commandLine.size()" so the next-element access
is bounded correctly without unsigned underflow.1 parent dd9d814 commit 682c27a
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
882 | | - | |
| 882 | + | |
883 | 883 | | |
884 | 884 | | |
885 | 885 | | |
886 | 886 | | |
887 | | - | |
888 | | - | |
| 887 | + | |
| 888 | + | |
889 | 889 | | |
890 | 890 | | |
891 | 891 | | |
| |||
0 commit comments