GitWCRev: Fix possible heap corruption