Thread (18 messages) flat view 18 messages, 5 authors, 2021-10-18

Re: [PATCH v3] sparse index: fix use-after-free bug in cache_tree_verify()

From: Bagas Sanjaya <hidden>
Date: 2021-10-08 09:38:39

On 08/10/21 01.07, Phillip Wood via GitGitGadget wrote:
-static void verify_one(struct repository *r,
-		       struct index_state *istate,
-		       struct cache_tree *it,
-		       struct strbuf *path)
+/*
+ * Returns:
+ *  0 - Verification completed.
+ *  1 - Restart verification - a call to ensure_full_index() freed the cache
+ *      tree that is being verified and verification needs to be restarted from
+ *      the new toplevel cache tree.
+ */
+static int verify_one(struct repository *r,
+		      struct index_state *istate,
+		      struct cache_tree *it,
+		      struct strbuf *path)
  {
  	int i, pos, len = path->len;
  	struct strbuf tree_buf = STRBUF_INIT;
What is verify_one() doing? I think it worth mentioning it in the 
comment above.

-- 
An old man doll... just what I always wanted! - Clara
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help