Fix possible loss of data in mosquitto_pub -l
when sending multiple long lines.
Closes #2078. Thanks to Ysincit.
This commit is contained in:
parent
36b42364ae
commit
24920c9a08
@ -1,3 +1,7 @@
|
|||||||
|
Clients:
|
||||||
|
- Fix possible loss of data in `mosquitto_pub -l` when sending multiple long
|
||||||
|
lines. Closes #2078.
|
||||||
|
|
||||||
2.0.7 - 2021-02-04
|
2.0.7 - 2021-02-04
|
||||||
==================
|
==================
|
||||||
|
|
||||||
|
@ -275,7 +275,7 @@ int pub_stdin_line_loop(struct mosquitto *mosq)
|
|||||||
break;
|
break;
|
||||||
}else{
|
}else{
|
||||||
line_buf_len += 1024;
|
line_buf_len += 1024;
|
||||||
pos += 1023;
|
pos += read_len-1;
|
||||||
read_len = 1024;
|
read_len = 1024;
|
||||||
buf2 = realloc(line_buf, (size_t )line_buf_len);
|
buf2 = realloc(line_buf, (size_t )line_buf_len);
|
||||||
if(!buf2){
|
if(!buf2){
|
||||||
|
Loading…
Reference in New Issue
Block a user