Skip to content

Commit dcffc85

Browse files
committed
gox'ed testfiles with compile errors or that hung the tests
1 parent e5b681e commit dcffc85

25 files changed

Lines changed: 61 additions & 129 deletions
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Goxed because it goes away too long... Maybe this should have a
2+
// short test and skip.
3+
14
package anchor
25

36
import (

common/entry.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,13 @@ func (e *Entry) UnmarshalBinary(data []byte) (err error) {
130130
}
131131

132132
// ExtIDs
133-
for i := extSize; i > 0; {
133+
for i := int16(extSize); i > 0; {
134134
var xsize int16
135135
binary.Read(buf, binary.BigEndian, &xsize)
136136
i -= 2
137-
137+
if i < 0 {
138+
return fmt.Errorf("Error parsing external IDs")
139+
}
138140
x := make([]byte, xsize)
139141
if n, err := buf.Read(x); err != nil {
140142
return err
@@ -144,8 +146,11 @@ func (e *Entry) UnmarshalBinary(data []byte) (err error) {
144146
n, c)
145147
}
146148
e.ExtIDs = append(e.ExtIDs, x)
147-
i -= uint16(n)
148-
}
149+
i -= int16(n)
150+
if i < 0 {
151+
return fmt.Errorf("Error parsing external IDs")
152+
}
153+
}
149154
}
150155

151156
// Content

common/varint_test.go

Lines changed: 0 additions & 125 deletions
This file was deleted.

0 commit comments

Comments
 (0)