forked from Lainports/freebsd-ports
Add DOCS and DOXYGEN options to allow building/installing extra documentation. Cherry-pick a few fixes from the upstream Git repo, and add one FreeBSD-specific fix to libprocinfo interface that caused crashes in the test rig, and add sscanf/printf vs type fixes. Fix a few things in exiv2 and Adobe XMP SDK found while test-compiling exiv2 consumers. All local fixes to .cpp filed with upstream repo as pull req. While here, reformat/rearrange to please portlint and portfmt/portclippy. Assisted and Reviewed by: diizzy@ PR: 272311 Differential Revision: https://reviews.freebsd.org/D40828
16 lines
693 B
C++
16 lines
693 B
C++
This patch fixes a crash when the procstat_getfiles()
|
|
return list contains non-vnodes that don't have an fs_path.
|
|
|
|
filed as https://github.com/Exiv2/exiv2/pull/2672
|
|
|
|
--- src/version.cpp.orig 2023-05-08 16:01:13 UTC
|
|
+++ src/version.cpp
|
|
@@ -148,7 +148,7 @@ static std::vector<std::string> getLoadedLibraries() {
|
|
struct filestat_list* files = procs ? procstat_getfiles(procstat, procs, true) : nullptr;
|
|
if (files) {
|
|
filestat* entry;
|
|
- STAILQ_FOREACH(entry, files, next) {
|
|
+ STAILQ_FOREACH(entry, files, next) if (entry && PS_FST_TYPE_VNODE == entry->fs_type && entry->fs_path) {
|
|
std::string path(entry->fs_path);
|
|
pushPath(path, libs, paths);
|
|
}
|