Thread (5 messages) flat view 5 messages, 3 authors, 2016-06-15

Re: git-revert is a memory hog

From: Jeff King <hidden>
Date: 2016-06-15 22:44:09

On Tue, Jan 29, 2008 at 05:45:58PM -0500, Jeff King wrote:
quoted
	if (rename_dst_nr > rename_limit && rename_src_nr > rename_limit)
		goto cleanup;
Hrm, yes, I think it can still overflow. (e.g., a 2 by 2^32-1
situation). But changing it to || isn't right, either; you would
I think the correct solution is just:

  /* check for overflow of square */
  if (rename_dst_nr > ULONG_MAX / rename_src_nr)
          goto cleanup;

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help