Merge pull request #5338 from pks-t/pks/patch-null-arithmetic patch_parse: fix undefined behaviour due to arithmetic on NULL pointers