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: https://github.com/zephyrproject-rtos/zephyr/issues/14001

Signed-off-by: Michael Scott <mike@foundries.io>
This commit is contained in:
Michael Scott 2019-03-02 09:51:05 -08:00 committed by Anas Nashif
commit bc5a3f25ad

View file

@ -188,7 +188,7 @@ int mdm_receiver_send(struct mdm_receiver_context *ctx,
do {
uart_poll_out(ctx->uart_dev, *buf++);
} while (size--);
} while (--size);
return 0;
}