vcsdiffpatchsources: Fix potential crashes

BUG: 334128
FIXED-IN: 4.7