stevenbenner/pacfinder

Optional dependencies for amavisd-new package shown with incorrect names

stevenbenner opened this issue · 1 comments

The optional dependencies listed in the amavisd-new package "Dependencies" tab are shown with incorrect names.

Screenshot_2022-03-17_04-58-38

(I am creating this bug for historical tracking purposes. I found and resolved the issue while doing a refactor of this code.)

Fixed in commit 19840a9.
Unit tests added in commit cce43c7.

The code to truncate the dependency string was using the g_strrstr() function to search for the location of ": ". But this is a reverse string search, so it was returning the last occurrence of the match instead of the first.

I have changed the search to use the standard strstr() function, which will return the location of first match.