Thread (1 message) 1 message, 1 author, 2018-12-06

Re: [PATCH 1/2] commit-graph, fuzz: Add fuzzer for commit-graph

From: Junio C Hamano <hidden>
Date: 2018-12-06 01:41:15

Junio C Hamano [off-list ref] writes:
quoted
+	if (graph_size < GRAPH_MIN_SIZE)
+		return NULL;
+
The load_commit_graph_one() grabbed graph_map out of xmmap() so it
is guaranteed to be non-NULL, but we need to check graph_map != NULL
when we're calling this directly from the fuzz tests, exactly in the
same spirit that we check graph_size above.  Besides, these are to
make sure future callers won't misuse the API.
Insert "Please check graph_map != NULL here, too." before the above
paragraph.
quoted
 	data = (const unsigned char *)graph_map;
And the reset of the function is the same as the original modulo
jumping to the cleanup_fail label has been replaced with returning
NULL.

Looks good.
Of course, s/reset/rest/ is what I meant.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help