[PATCH] Off-by-one error in GDALReplicateWord
|Reported by:||bclaywell||Owned by:||rouault|
(This bug was observed in 1.8.0, but the relevant code in trunk appears unchanged.)
When attempting to expand the canvas of an image with a non-zero nodata value (1, in this case) we noticed that the rightmost column of the image was still zero. Inspection of the GByte packed buffer case in GDALReplicateWord reveals that the count argument to memset is nWordCount - 1 (line 1095) even though it was already decremented on line 1086 to account for the value already being copied into the first element of pDstData.