Use convert_ui() instead of strtoul_ui() when parsing tree entries' modes. This tightens up the parsing a bit:
* Leading whitespace is no longer allowed * '+' and '-' are no longer allowed Signed-off-by: Michael Haggerty <mhag...@alum.mit.edu> --- contrib/convert-objects/convert-objects.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/convert-objects/convert-objects.c b/contrib/convert-objects/convert-objects.c index f3b57bf..4f484a4 100644 --- a/contrib/convert-objects/convert-objects.c +++ b/contrib/convert-objects/convert-objects.c @@ -1,4 +1,5 @@ #include "cache.h" +#include "numparse.h" #include "blob.h" #include "commit.h" #include "tree.h" @@ -88,7 +89,7 @@ static int write_subdirectory(void *buffer, unsigned long size, const char *base unsigned int mode; char *slash, *origpath; - if (!path || strtoul_ui(buffer, 8, &mode)) + if (!path || convert_ui(buffer, 8, &mode)) die("bad tree conversion"); mode = convert_mode(mode); path++; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html