encoding/xml: reject > chain with non-element

Fixes #5033.

R=golang-dev, r
CC=golang-dev
https://golang.org/cl/7764044
This commit is contained in:
Russ Cox 2013-03-12 16:42:25 -04:00
parent 8323cef77c
commit bfe80e21e4
3 changed files with 35 additions and 10 deletions

View file

@ -301,7 +301,7 @@ func (p *printer) marshalStruct(tinfo *typeInfo, val reflect.Value) error {
s := parentStack{printer: p}
for i := range tinfo.fields {
finfo := &tinfo.fields[i]
if finfo.flags&(fAttr) != 0 {
if finfo.flags&fAttr != 0 {
continue
}
vf := finfo.value(val)