Skip to content

Commit bc5a3f2

Browse files
mike-scottnashif
authored andcommitted
drivers: modem: fix extra bytes sent by mdm_receiver_send()
mdm_receiver_send() was sending 1 too many bytes of buf. This ended up being the NULL terminator. Size should be reduced prior to the while check so that this doesn't happen. Fixes: #14001 Signed-off-by: Michael Scott <[email protected]>
1 parent 0ef2408 commit bc5a3f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/modem/modem_receiver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ int mdm_receiver_send(struct mdm_receiver_context *ctx,
188188

189189
do {
190190
uart_poll_out(ctx->uart_dev, *buf++);
191-
} while (size--);
191+
} while (--size);
192192

193193
return 0;
194194
}

0 commit comments

Comments
 (0)