durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5258

AFFECTED FILES
  mercurial/cext/manifest.c

CHANGE DETAILS

diff --git a/mercurial/cext/manifest.c b/mercurial/cext/manifest.c
--- a/mercurial/cext/manifest.c
+++ b/mercurial/cext/manifest.c
@@ -137,13 +137,13 @@
                        return MANIFEST_TOO_SHORT_LINE;
                }
                next++; /* advance past newline */
-               if (!realloc_if_full(self)) {
-                       return MANIFEST_OOM; /* no memory */
-               }
                if (prev && strcmp(prev, data) > -1) {
                        /* This data isn't sorted, so we have to abort. */
                        return MANIFEST_NOT_SORTED;
                }
+               if (!realloc_if_full(self)) {
+                       return MANIFEST_OOM; /* no memory */
+               }
                l = self->lines + ((self->numlines)++);
                l->start = data;
                l->len = next - data;



To: durin42, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to