blame: improve diagnosis for "--reverse NEW"
[gitweb.git] / ll-merge.c
index 0338630fc2a5378ed33afa828db4940b34aabe82..ff4a43a982a6a67ec826fdb01153a9e35e720751 100644 (file)
@@ -205,7 +205,7 @@ static int ll_ext_merge(const struct ll_merge_driver *fn,
        if (fstat(fd, &st))
                goto close_bad;
        result->size = st.st_size;
-       result->ptr = xmalloc(result->size + 1);
+       result->ptr = xmallocz(result->size);
        if (read_in_full(fd, result->ptr, result->size) != result->size) {
                free(result->ptr);
                result->ptr = NULL;