Update XDR dependency (fixes #1606)

This commit is contained in:
Jakob Borg
2015-04-08 14:44:47 +02:00
parent 2a48fb8e87
commit f5030f1c2c
10 changed files with 89 additions and 36 deletions

View File

@@ -68,7 +68,8 @@ func (r *Reader) ReadBytesMaxInto(max int, dst []byte) []byte {
if r.err != nil {
return nil
}
if max > 0 && l > max {
if l < 0 || max > 0 && l > max {
// l may be negative on 32 bit builds
r.err = ElementSizeExceeded("bytes field", l, max)
return nil
}