Allan McRae pushed to branch master at Pacman / Pacman


Commits:
74deada5 by Allan McRae at 2024-02-26T03:42:53+00:00
pacman/callback.c: handle empty pkgname

In pacman's progress callback, pkgname being null may result in a
segfault, due to undefined printf behaviour.  libalpm always passes
at least an empty string for pkgname, so this situation is largely
avoided.

However, the callback mostly checked for pkgname's being non-null
and not empty.  This means a additional space was being added to
the output messages (although with zero actual effect on the output).

Be a bit more robust here by treating null and empty pkgname the
same and fixing the invisible output issue...

Signed-off-by: Allan McRae <[email protected]>

- - - - -


1 changed file:

- src/pacman/callback.c


View it on GitLab: 
https://gitlab.archlinux.org/pacman/pacman/-/commit/74deada511358a4ce9c10ee0c6ae216e2c6c6b73

-- 
View it on GitLab: 
https://gitlab.archlinux.org/pacman/pacman/-/commit/74deada511358a4ce9c10ee0c6ae216e2c6c6b73
You're receiving this email because of your account on gitlab.archlinux.org.


Reply via email to