[PATCH 6.10 454/482] lib/buildid: harden build ID parsing logic