While taking an EnVar as the parameter is more clear it has the disadvantage, that passing anything outside of the range of the enumeration is undefined behavior. The compiler could then optimize the range check in getEnv away (perfectly legal due to UB), leading to buffer overreads. |
||
|---|---|---|
| .. | ||
| exiv2 | ||