Merge branch 'V5-6-patches' into V5-7-patches

* V5-6-patches:
  swrun_*: Simplify commit da00ba1
  swrun_*: Restore buffer overflow prevention code that was removed in da00ba1