| 859 | } |
| 860 | |
| 861 | static timestamp_t parse_timestamp_from_buf(const char **start, const char *end) |
| 862 | { |
| 863 | const char *p = *start; |
| 864 | char buf[24]; /* big enough for 2^64 */ |
| 865 | size_t i = 0; |
| 866 | |
| 867 | while (p < end && isdigit(*p)) { |
| 868 | if (i >= ARRAY_SIZE(buf) - 1) |
| 869 | return TIME_MAX; |
| 870 | buf[i++] = *p++; |
| 871 | } |
| 872 | buf[i] = '\0'; |
| 873 | *start = p; |
| 874 | return parse_timestamp(buf, NULL, 10); |
| 875 | } |
| 876 | |
| 877 | static int fsck_ident(const char **ident, const char *ident_end, |
| 878 | const struct object_id *oid, enum object_type type, |