From: Derrick Stolee Date: Thu, 26 Dec 2019 14:36:43 GMT Subject: Re: [PATCH 09/20] t5319: change invalid offset for SHA-256 compatibility Message-ID: In-Reply-To: <20191221194936.1346664-10-sandals@crustytoothpaste.net> On 12/21/2019 2:49 PM, brian m. carlson wrote: > When using SHA-1, the existing value of the byte we use is 0x13, so > writing the byte 0x07 serves to corrupt the test and verify that we > detect corruption. However, when we use SHA-256, the value at that > offset is already 0x07, so our "corruption" doesn't work and the test > fails to detect it. Huh. What a coincidence. > To provide a value that is truly out of range, let's use 0xff, which is > not likely to be a valid value as the high byte of a two-byte offset in > a multi-pack index this small. Good future-proofing. Thanks!