dns: check length in UnmarshalDomain to avoid panic

This commit is contained in:
nadoo committed 2020-08-21 23:54:18 +08:00
1 parent a118ec5837
commit a42d3a68d0
6 files changed
+18 -11

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ func (s *SS) Serve(c net.Conn) {
n, err := c.Read(buf)
if err != nil {
log.F("[ss-uottun] error in ioutil.ReadAll: %s\n", err)
log.F("[ss-uottun] error in read: %s\n", err)
return
}