mirror of
https://github.com/anchore/syft.git
synced 2026-11-01 06:56:40 +01:00
The traefik-binary classifier regex required a NUL byte or replacement character immediately before the version string. On some architectures (e.g. s390x), the real version string in the binary has no such prefix, so the classifier instead matched an earlier, unrelated NUL-prefixed numeric string elsewhere in the binary (e.g. '2.7.0' from an unrelated printf-style format constant), producing an incorrect version. This adds an additional pattern, tried first via MatchAny, that matches version strings terminated by two NUL bytes without requiring a NUL prefix. The original pattern remains as a fallback for older traefik binaries (e.g. v1.x) that use single-NUL termination. Fixes #4980 Signed-off-by: Mayank Sekhar <mayankshekharsingh@gmail.com>