Skip to content

Commit 3e2de62

Browse files
committed
modbus_send_raw_request_tid: reject NULL raw_req with EINVAL
1 parent 5605250 commit 3e2de62

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/modbus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ int modbus_send_raw_request_tid(modbus_t *ctx,
236236
uint8_t req[MAX_MESSAGE_LENGTH];
237237
int req_length;
238238

239-
if (ctx == NULL) {
239+
if (ctx == NULL || raw_req == NULL) {
240240
errno = EINVAL;
241241
return -1;
242242
}

0 commit comments

Comments
 (0)