Improved buffer overflow messages. stable-1.5
authorFlorian Pose <fp@igh.de>
Wed, 13 Dec 2017 15:39:13 +0100
branchstable-1.5
changeset 2693 8051d05cb935
parent 2692 cb240525acb6
child 2694 ab97efc5513a
Improved buffer overflow messages.
master/ioctl.c
master/master.c
--- a/master/ioctl.c	Wed Dec 06 10:09:50 2017 +0100
+++ b/master/ioctl.c	Wed Dec 13 15:39:13 2017 +0100
@@ -3876,7 +3876,7 @@
         ret = -EIO;
     } else {
         if (request.data_size > io.buffer_size) {
-            EC_MASTER_ERR(master, "Buffer too small.\n");
+            EC_SLAVE_ERR(slave, "%s(): Buffer too small.\n", __func__);
             ec_foe_request_clear(&request);
             return -EOVERFLOW;
         }
--- a/master/master.c	Wed Dec 06 10:09:50 2017 +0100
+++ b/master/master.c	Wed Dec 13 15:39:13 2017 +0100
@@ -3077,7 +3077,7 @@
         }
     } else {
         if (request.data_size > target_size) {
-            EC_MASTER_ERR(master, "Buffer too small.\n");
+            EC_SLAVE_ERR(slave, "%s(): Buffer too small.\n", __func__);
             ret = -EOVERFLOW;
         }
         else {
@@ -3235,7 +3235,7 @@
         ret = -EIO;
     } else { // success
         if (request.data_size > target_size) {
-            EC_MASTER_ERR(master, "Buffer too small.\n");
+            EC_SLAVE_ERR(slave, "%s(): Buffer too small.\n", __func__);
             ret = -EOVERFLOW;
         }
         else { // data fits in buffer