unsigned int mode;
char *slash, *origpath;
- if (!path || sscanf(buffer, "%o", &mode) != 1)
+ if (!path || strtoul_ui(buffer, 8, &mode))
die("bad tree conversion");
mode = convert_mode(mode);
path++;
unsigned long orig_size = size;
while (size) {
- int len = 1+strlen(buffer);
+ size_t len = 1+strlen(buffer);
convert_binary_sha1((char *) buffer + len);