]> git.ipfire.org Git - thirdparty/rsync.git/commit
options.c: Fix segv if poptGetContext returns NULL
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Thu, 30 Jan 2025 03:27:38 +0000 (13:27 +1000)
committerAndrew Tridgell <andrew@tridgell.net>
Sat, 23 Aug 2025 07:49:03 +0000 (17:49 +1000)
commitc2db9218902c12d303ccd0d26c62d7e27de85712
treedbf897a48684af705fa20b7fc7bd24ea91e0a33c
parent77be09aaed1f0ae309b6203c55500e41a4c5e395
options.c: Fix segv if poptGetContext returns NULL

If poptGetContext returns NULL, perhaps due to OOM,
a NULL pointer is passed into poptReadDefaultConfig()
which in turns SEGVs when trying to dereference it.

This was found using https://github.com/sahlberg/malloc-fail-tester.git
$ ./test_malloc_failure.sh rsync -Pav crash crosh

Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
options.c