aboutsummaryrefslogtreecommitdiff
path: root/src/apps/optargpm.h
AgeCommit message (Collapse)Author
2022-02-19Fix nullptr dereference in utilities whan argv[0] == NULLEven Rouault
https://lwn.net/Articles/?offset=50 was an entertaining reading where we learn that the fact that argv[0] contains the name of the binary is purely a convention, normally taken by the shell that launches the process, but not guaranteed by the execve() system call that does the job. The following test program tested against cct, cs2cs, geod, gie and proj make them cause a null pointer dereference ``` #include <unistd.h> #include <stdio.h> extern char **environ; int main() { char* argv[] = { NULL }; printf("%d\n", execve("/path/to/some/proj/binary", argv, environ)); return 0; } ```
2021-03-07typo fixesEven Rouault
2019-10-28Various fixes/workarounds to make cppcheck 1.72 (Ubuntu 16.04) and ↵Even Rouault
HEAD/1.90dev happy (fixes #1648)
2019-03-27optargpm.h: fix remaining memleak in error code path. Coverity CID 193537Even Rouault
2019-03-26optargpm.h: fix memory leaks in error code paths. Coverity CID 193537Even Rouault
2018-12-26cpp conversion: move source files in apps/ iso19111/ conversions/ ↵Even Rouault
projections/ transformations/ tests/ subdirectories