commit | 6d322159c633050a405b03b927db76b89e402014 | [log] [tgz] |
---|---|---|
author | Alexey Izbyshev <[email protected]> | Fri Mar 10 20:00:31 2023 +0300 |
committer | Rich Felker <[email protected]> | Tue Apr 11 09:18:38 2023 -0400 |
tree | 3c8fe56b45f18e2a80fcda63f854ee6fef3b2703 | |
parent | 35e9831156efc1b54e1a91917ba0f787d5df3353 [diff] |
getopt: fix null pointer arithmetic ub When an option that requires an argument is the last character of argv[argc-1], getopt computes argv[argc] + optpos. While optpos is always zero in this case, adding it to null pointer is still undefined.