Skip to content

Fix segfault in pkgAcquire::Enqueue() with Acquire::Queue-Mode=access

Julian Andres Klode requested to merge jak/apt:master into master

In commit 79b1a829, QueueName() was changed, amongst other things, to exit early when the queue mode was single access, as single access does not need any fancy queue name. The exit became too early though, as Config was not initialized anymore, but the caller was relying on it.

Fix QueueName() to always initialize Config and in Enqueue() initialize Config with a nullptr, so if this regresses it's guaranteed to fail harder. Also add a test case - this is very simple, but the first and only test case for access queue mode.

Edited by Julian Andres Klode

Merge request reports

Loading