diff options
-rw-r--r-- | anzeige.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -101,7 +101,7 @@ int main(int argc, char **argv) for (int i=0; i<THREAD_IDX_MAX; i++) if (input_threads[i].output_ready) { if (strcmp(text_buffers[i], input_threads[i].text_output)) { - strcpy(text_buffers[i], input_threads[i].text_output); + strncpy(text_buffers[i], input_threads[i].text_output, MAX_TEXT_OUTPUT_LEN); updated = 1; } if (i == THREAD_IDX_OUTSIDE) { @@ -128,7 +128,7 @@ int main(int argc, char **argv) inside_humidity ); if (strcmp(text_buffers[THREAD_IDX_INSIDE], humidity_text_buffer)) { - strcpy(text_buffers[THREAD_IDX_INSIDE], humidity_text_buffer); + strncpy(text_buffers[THREAD_IDX_INSIDE], humidity_text_buffer, MAX_TEXT_OUTPUT_LEN); updated = 1; } } |