aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/ui_lib.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-23 21:30:23 +0800
committerobscuren <geffobscura@gmail.com>2014-08-23 21:30:23 +0800
commit444c9effdb2458d7130be5a5e1cad1d719c67114 (patch)
tree89993f0fc86194c67168ded0bf8467f713cc4610 /ethereal/ui_lib.go
parentded013b7a7367f74b9c854755a7ce4a6955e93c0 (diff)
downloadgo-tangerine-444c9effdb2458d7130be5a5e1cad1d719c67114.tar
go-tangerine-444c9effdb2458d7130be5a5e1cad1d719c67114.tar.gz
go-tangerine-444c9effdb2458d7130be5a5e1cad1d719c67114.tar.bz2
go-tangerine-444c9effdb2458d7130be5a5e1cad1d719c67114.tar.lz
go-tangerine-444c9effdb2458d7130be5a5e1cad1d719c67114.tar.xz
go-tangerine-444c9effdb2458d7130be5a5e1cad1d719c67114.tar.zst
go-tangerine-444c9effdb2458d7130be5a5e1cad1d719c67114.zip
Check data length
Diffstat (limited to 'ethereal/ui_lib.go')
-rw-r--r--ethereal/ui_lib.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ethereal/ui_lib.go b/ethereal/ui_lib.go
index 4b8210da6..fa09751e1 100644
--- a/ethereal/ui_lib.go
+++ b/ethereal/ui_lib.go
@@ -53,7 +53,7 @@ func (self *UiLib) LookupDomain(domain string) string {
data := world.Config().Get("DnsReg").StorageString(domain).Bytes()
// Left padded = A record, Right padded = CNAME
- if data[0] == 0 {
+ if len(data) > 0 && data[0] == 0 {
data = bytes.TrimLeft(data, "\x00")
var ipSlice []string
for _, d := range data {