Fix DOS vulnerabilities reported by "8ARTEK0V0"
Merge remote-tracking branch 'upstream/master'