Skip to content

Commit 66e585c

Browse files
author
BiffoBear
committed
Fixed buffer overrun in adafruit_wiznet5k_dhcp.send_dhcp_message
1 parent 5f501fd commit 66e585c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_dhcp.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ def __init__(
9595
):
9696
self._debug = debug
9797
self._response_timeout = response_timeout
98+
99+
# Prevent buffer overrun in send_dhcp_message()
100+
if len(mac_address) != 6:
101+
raise ValueError("The MAC address must be 6 bytes.")
98102
self._mac_address = mac_address
99103

100104
# Set socket interface

0 commit comments

Comments
 (0)