Re: fsck errors on newly cloned, newly imported git repository

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Following up to my own post, after some serious debugging, it turned
out that the libcrypto library was to blame.

I found that after the clone, a git index-pack on the pack-file would
generate a different index each time (from the same pack-file).  I
narrowed it down to this routine returning an incorrect sha1 on "bad"
machines:

static void write_sha1_file_prepare(const void *buf, unsigned long len,
                                    const char *type, unsigned char *sha1,
                                    char *hdr, int *hdrlen)
{
        git_SHA_CTX c;

        /* Generate the header */
        *hdrlen = sprintf(hdr, "%s %lu", type, len)+1;

        /* Sha1.. */
        git_SHA1_Init(&c);
        git_SHA1_Update(&c, hdr, *hdrlen);
        git_SHA1_Update(&c, buf, len);
        git_SHA1_Final(sha1, &c);
}

Upgrading the libcrypto solved the problem on both machines.

FYI, the offending versions were openssl-0.9.7a-26 and
openssl-0.9.7a-35 (these were Fedora Core 2 vintage).  Hopefully
no-one has any systems this old lying around any longer.

Mike.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]