spiegel_podman/cmd
Mikhail Dmitrichenko 678d1b4bfd avoid potential nil ptr deref in image rm
In function rm variable `report` might be initialized as nil as a result
of call
`registry.ImageEngine().Remove(registry.Context(), args, imageOpts)`.
Then, there is a call `registry.SetExitCode(report.ExitCode)` without
explicit nil check before. Check `len(rmErrors) > 0` doesn't guarantee
that report is a non-nil value.
So such call may lead to nil deref.

This commit adds check `report` for nil before its dereference.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Signed-off-by: Mikhail Dmitrichenko <m.dmitrichenko222@gmail.com>
2025-12-09 09:50:33 -05:00
..
podman avoid potential nil ptr deref in image rm 2025-12-09 09:50:33 -05:00
podman-mac-helper lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
podman-testing lint: reenable revive unused-parameter check 2025-10-01 10:42:08 -04:00
podman-wslkerninst WSL commands execution refactoring 2025-07-02 20:18:52 +00:00
quadlet fileperms: newer Go 1.13+ octal literal format 2025-10-16 14:11:29 -04:00
rootlessport fileperms: newer Go 1.13+ octal literal format 2025-10-16 14:11:29 -04:00
winpath use strings.SplitSeq where possible 2025-09-10 16:17:04 +02:00