mirror of
https://github.com/nadoo/glider.git
synced 2026-11-23 23:49:41 +08:00
dns: check length in UnmarshalDomain to avoid panic
This commit is contained in:
1 parent
a118ec5837
commit
a42d3a68d0
6 files changed
+18
-11
No files matched your search
@@ -88,9 +88,10 @@ func (s *UoTTun) ListenAndServe() {
|
||||
}
|
||||
|
||||
// remote forwarder, udp over tcp
|
||||
// TODO: check here carefully, ReadAll allocates buffer and may leads to memory leak.
|
||||
resp, err := ioutil.ReadAll(rc)
|
||||
if err != nil {
|
||||
log.F("error in ioutil.ReadAll: %s\n", err)
|
||||
log.F("[uottun] error in ioutil.ReadAll: %s\n", err)
|
||||
return
|
||||
}
|
||||
rc.Close()
|
||||
|
||||
Reference in new issue
Block a user