mirror of
https://github.com/rpm-software-management/popt.git
synced 2026-09-20 00:46:06 +00:00
C library for parsing command line parameters
- C 77%
- Roff 16.1%
- Shell 4.2%
- CMake 2.5%
- Dockerfile 0.2%
The poptStuffArgs function only checks whether (con->os - con->optionStack) is equal to POPT_OPTION_DEPTH (10) before incrementing con->os, and does not increment the value by 1 to perform boundary pre-checking, as handleAlias does. Add a new test program as a reproducer for this case. Co-authored-by: Panu Matilainen <pmatilai@redhat.com> Fixes: CVE-2026-18739 |
||
|---|---|---|
| .github | ||
| ci | ||
| cmake | ||
| doc | ||
| src | ||
| tests | ||
| .gitignore | ||
| .popt | ||
| CMakeLists.txt | ||
| COPYING | ||
| CREDITS | ||
| popt.3 | ||
| popt.pdf | ||
| README | ||
This is the popt(3) command line option parsing library. While it is similar to getopt(3), it contains a number of enhancements, including: 1) popt is fully reentrant 2) popt can parse arbitrary argv[] style arrays while getopt(3) makes this quite difficult 3) popt allows users to alias command line arguments 4) popt provides convenience functions for parsing strings into argv[] style arrays Complete documentation on popt(3) is available in popt.pdf (included in this tarball), which is excerpted with permission from the book "Linux Application Development" by Michael K. Johnson and Erik Troan (available from Addison Wesley in May, 1998). Bugs, feature requests and contributions can be submitted at https://github.com/rpm-software-management/popt or alternatively rpm-maint@lists.rpm.org.