commit | 13c0176567840c639aa9e7d040199905a12e02de | [log] [tgz] |
---|---|---|
author | Jungho Ahn <jhahn@google.com> | Mon Feb 01 15:51:48 2016 -0800 |
committer | Jungho Ahn <jhahn@google.com> | Mon Feb 01 15:52:52 2016 -0800 |
tree | a0f376009be388c36564bb6e356d69dcc7eddd15 | |
parent | 59953aa1f3cc26c74bbdd78b45847967c471304b [diff] |
third_party:mdns: fix a bug Add a missing packet message boundary check. Change-Id: Iba2cd17a0070f483c4547d23efa08550402835ce
diff --git a/go/src/github.com/presotto/go-mdns-sd/go_dns/msg.go b/go/src/github.com/presotto/go-mdns-sd/go_dns/msg.go index fa2b87e..448e634 100644 --- a/go/src/github.com/presotto/go-mdns-sd/go_dns/msg.go +++ b/go/src/github.com/presotto/go-mdns-sd/go_dns/msg.go
@@ -507,6 +507,9 @@ off += 2 case *uint32: i := *fv + if off+4 > len(msg) { + return false + } msg[off] = byte(i >> 24) msg[off+1] = byte(i >> 16) msg[off+2] = byte(i >> 8)