summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--anzeige.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/anzeige.c b/anzeige.c
index b28dd62..6f906d9 100644
--- a/anzeige.c
+++ b/anzeige.c
@@ -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;
}
}