aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--serprog.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/serprog.c b/serprog.c
index 2bbf44b3..ea2bbf0b 100644
--- a/serprog.c
+++ b/serprog.c
@@ -291,7 +291,8 @@ static int sp_stream_buffer_op(uint8_t cmd, uint32_t parmlen, uint8_t *parms)
return 1;
}
sp[0] = cmd;
- memcpy(&(sp[1]), parms, parmlen);
+ if (parms)
+ memcpy(&(sp[1]), parms, parmlen);
if (sp_streamed_transmit_bytes >= (1 + parmlen + sp_device_serbuf_size)) {
if (sp_flush_stream() != 0) {