Skip to content

Commit e662a8c

Browse files
committed
1 parent d78dc1e commit e662a8c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/net/ldap/connection.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def open_connection(server)
7474

7575
module GetbyteForSSLSocket
7676
def getbyte
77-
getc.ord
77+
(nextbyte = read(1)) or return
78+
nextbyte.ord
7879
end
7980
end
8081

@@ -467,6 +468,10 @@ def search(args = nil)
467468
end
468469
end
469470

471+
if result_pdu.nil?
472+
raise Net::LDAP::ResponseMissingOrInvalidError, "response missing"
473+
end
474+
470475
# count number of pages of results
471476
payload[:page_count] ||= 0
472477
payload[:page_count] += 1

0 commit comments

Comments
 (0)