checkBlobPath performs some basic validation
(dgst digest.Digest, root string)
| 35 | |
| 36 | // checkBlobPath performs some basic validation |
| 37 | func checkBlobPath(dgst digest.Digest, root string) error { |
| 38 | if err := dgst.Validate(); err != nil { |
| 39 | return err |
| 40 | } |
| 41 | path := filepath.Join(root, "blobs", dgst.Algorithm().String(), dgst.Encoded()) |
| 42 | _, err := os.Stat(path) |
| 43 | if err != nil { |
| 44 | return err |
| 45 | } |
| 46 | return nil |
| 47 | } |
| 48 | |
| 49 | // generateBlobs is a helper function to create random blobs |
| 50 | func generateBlobs(f *fuzz.ConsumeFuzzer) (map[digest.Digest][]byte, error) { |
no test coverage detected
searching dependent graphs…