From: Atousa Duprat Date: Sun, 01 Nov 2015 06:41:17 GMT Subject: Re: [PATCH] Limit the size of the data block passed to SHA1_Update() Message-ID: In-Reply-To: >> +int git_SHA1_Update(SHA_CTX *c, const void *data, size_t len) >> +{ >> + size_t nr; >> + size_t total = 0; >> + char *cdata = (char*)data; > I am not sure about the cast > here, though. Doesn't the function SHA1_Update() you are going to > call in the body of the loop take "const void *" as its second > parameter? That's how openssl/sha1.h and block-sha1/sha1.h declare > this function. Indeed, the declaration needs a const void *; but I need to advance by a specific number of bytes in each iteration of the loop. Hence the cast. Atousa