mirror of
https://github.com/pion/stun.git
synced 2025-09-27 04:05:57 +08:00
fuzz: enable for setters and fix found crashers
This commit is contained in:
@@ -3,6 +3,7 @@ package stun
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
)
|
||||
|
||||
// ErrorCodeAttribute represents ERROR-CODE attribute.
|
||||
@@ -51,6 +52,9 @@ func (c *ErrorCodeAttribute) GetFrom(m *Message) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if len(v) < errorCodeReasonStart {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
var (
|
||||
class = uint16(v[errorCodeClassByte])
|
||||
number = uint16(v[errorCodeNumberByte])
|
||||
|
Reference in New Issue
Block a user