# HG changeset patch # User Florian Pose # Date 1513175953 -3600 # Node ID 8051d05cb935111f19b1b2b20f34e345c6c8ca88 # Parent cb240525acb6240269aa84d09e8bd1b55bc3d9f3 Improved buffer overflow messages. diff -r cb240525acb6 -r 8051d05cb935 master/ioctl.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; } diff -r cb240525acb6 -r 8051d05cb935 master/master.c --- 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