Browse Source

Merge pull request #1147 from blemasle/develop

fixed panic error on user login
pull/1152/head
无闻 10 years ago
parent
commit
5a5f072177
  1. 5
      modules/asn1-ber/ber.go

5
modules/asn1-ber/ber.go

@ -5,6 +5,7 @@ import (
"fmt"
"io"
"reflect"
"errors"
)
type Packet struct {
@ -177,6 +178,10 @@ func readBytes(reader io.Reader, buf []byte) error {
idx := 0
buflen := len(buf)
if reader == nil {
return errors.New("reader was nil, aborting")
}
for idx < buflen {
n, err := reader.Read(buf[idx:])
if err != nil {

Loading…
Cancel
Save