Commit Diff


commit - cbb2185c687e1b7de7ee59e91e23ab64c6607571
commit + 00d10bca0a12585f81942e747b330101d0f7303a
blob - d462598db9e15145bb7cda1fc9ca7357de35b04a
blob + 9731ce78ee76e120a9a9747158089178ac3758e7
--- lib/object_parse.c
+++ lib/object_parse.c
@@ -824,7 +824,7 @@ parse_tree_entry(struct got_parsed_tree_entry *pte, si
 	pte->mode = 0;
 	p = buf;
 	while (p < space) {
-		if (*p < '0' && *p > '7')
+		if (*p < '0' || *p > '7')
 			return got_error(GOT_ERR_BAD_OBJ_DATA);
 		pte->mode <<= 3;
 		pte->mode |= *p - '0';