impl vercmp fuzzer

This commit is contained in:
John Turner
2025-11-19 01:00:48 +00:00
parent e01637fd3a
commit 70e8ea24a8
6 changed files with 185 additions and 1 deletions

14
scripts/vercmp.py Executable file
View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python3
import sys
import portage
for line in sys.stdin.buffer:
a, b = line.decode().split(" ")
try:
sys.stdout.buffer.write(f"{portage.vercmp(a, b)}\n".encode())
except:
sys.stdout.buffer.write(b"err\n")
finally:
sys.stdout.buffer.flush()