commit f1165c794c498a63e9167441e7294d79d558500e from: Stefan Sperling via: Thomas Adam date: Sun Oct 10 10:46:55 2021 UTC make got_repo_match_object_id() filter tags by the requested object type Potentially this function could return objects of a type that was not requested. Problem found by code inspection. This change does not affect any of our existing tests. commit - bea5ae74558ed1bc5c8372306ead95c29c5bc362 commit + f1165c794c498a63e9167441e7294d79d558500e blob - 5c7fe289fa9cc9d698112237e6ab55298613e64b blob + d60df001bcb7f20216fb03d0e53bde49d64c0f5a --- lib/repository.c +++ lib/repository.c @@ -1505,7 +1505,7 @@ got_repo_match_object_id(struct got_object_id **id, ch *label = NULL; if (refs) { - err = got_repo_object_match_tag(&tag, id_str, GOT_OBJ_TYPE_ANY, + err = got_repo_object_match_tag(&tag, id_str, obj_type, refs, repo); if (err == NULL) { *id = got_object_id_dup(