mirror of
https://github.com/Hamlib/Hamlib
synced 2026-08-13 17:32:05 -04:00
Ensure read_string value is terminated
This commit is contained in:
parent
4f828f7215
commit
d0bb4de156
1 changed files with 2 additions and 0 deletions
|
|
@ -692,6 +692,8 @@ int HAMLIB_API read_string(hamlib_port_t *p,
|
|||
/* Store the time of the read loop start */
|
||||
gettimeofday(&start_time, NULL);
|
||||
|
||||
rxbuffer[0] = 0; /* ensure string is terminated */
|
||||
|
||||
while (total_count < rxmax - 1)
|
||||
{
|
||||
tv = tv_timeout; /* select may have updated it */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue