Decreased maximum length of error message to avoid stack warning. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 10 Jan 2012 11:30:03 +0100
branchstable-1.5
changeset 2257 a2a675601c98
parent 2252 6001f50617a7
child 2258 79269cfe25a7
Decreased maximum length of error message to avoid stack warning.
master/fsm_foe.c
--- a/master/fsm_foe.c	Tue Jan 10 10:56:24 2012 +0100
+++ b/master/fsm_foe.c	Tue Jan 10 11:30:03 2012 +0100
@@ -729,7 +729,8 @@
         return;
     }
 
-    if (!(data = ec_slave_mbox_fetch(slave, datagram, &mbox_prot, &rec_size))) {
+    if (!(data = ec_slave_mbox_fetch(slave, datagram, &mbox_prot,
+                    &rec_size))) {
         ec_foe_set_rx_error(fsm, FOE_MBOX_FETCH_ERROR);
         return;
     }
@@ -755,7 +756,7 @@
         EC_SLAVE_ERR(slave, "Received FoE Error Request (code 0x%08x).\n",
                 fsm->request->error_code);
         if (rec_size > 6) {
-            uint8_t text[1024];
+            uint8_t text[256];
             strncpy(text, data + 6, min(rec_size - 6, sizeof(text)));
             EC_SLAVE_ERR(slave, "FoE Error Text: %s\n", text);
         }