Skip to content

Commit 0e5f420

Browse files
committed
fix(lwip): Initialize len to ensure it's set before check
1 parent 47993cd commit 0e5f420

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: libraries/Network/src/NetworkUdp.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ int NetworkUDP::parsePacket() {
296296
}
297297
struct sockaddr_storage si_other_storage; // enough storage for v4 and v6
298298
socklen_t slen = sizeof(sockaddr_storage);
299-
int len;
299+
int len = 0;
300300
if (ioctl(udp_server, FIONREAD, &len) == -1) {
301301
log_e("could not check for data in buffer length: %d", errno);
302302
return 0;

0 commit comments

Comments
 (0)