Skip to content

Commit

Permalink
Update packet.go
Browse files Browse the repository at this point in the history
  • Loading branch information
forestmgy authored and hsluoyz committed Oct 8, 2024
1 parent 3cc1d29 commit e876eac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packet.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func readTagAndLength(conn *bufio.Reader, bytes *[]byte) (ret ldap.TagAndLength,
// }
// We are expecting the LDAP sequence tag 0x30 as first byte
if b != 0x30 {
panic(fmt.Sprintf("Expecting 0x30 as first byte, but got %#x instead", b))
err = ldap.SyntaxError{fmt.Sprintf("expecting 0x30 as first byte, but got %#x instead", b)}
return
}

b, err = readBytes(conn, bytes, 1)
Expand Down

0 comments on commit e876eac

Please sign in to comment.