| 294 | } |
| 295 | |
| 296 | int within_depth(const char *name, int namelen, |
| 297 | int depth, int max_depth) |
| 298 | { |
| 299 | const char *cp = name, *cpe = name + namelen; |
| 300 | |
| 301 | while (cp < cpe) { |
| 302 | if (*cp++ != '/') |
| 303 | continue; |
| 304 | depth++; |
| 305 | if (depth > max_depth) |
| 306 | return 0; |
| 307 | } |
| 308 | return depth <= max_depth; |
| 309 | } |
| 310 | |
| 311 | /* |
| 312 | * Read the contents of the blob with the given OID into a buffer. |
no outgoing calls
no test coverage detected