Version: 1
-Previous: 2f8e6c30028bf9bf098aee8439fcbadab5972ca3
+Previous: d694872ccf13424dbdbafdb6089b0cc1109595fd
Head: 5658ff385e0449a78a325d430163e524b7a97ec4
Applied:
- snprintf: 5658ff385e0449a78a325d430163e524b7a97ec4
Unapplied:
preload: 5dfe7abc07064485c5100e04e5412279244c2bc3
Hidden:
+++ /dev/null
-Bottom: efccb146a38888a3e615a81017329971c08b8fc1
-Top: de666c51520c9988ea3a07e332fa0402fdef6010
-Author: Dotan Barak <dotanb@dev.mellanox.co.il>
-Date: 2012-04-24 11:20:55 -0700
-
-rping: Replace sprintf with snprintf to protect from buffer overflow
-
-Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-diff --git a/examples/rping.c b/examples/rping.c
-index ee292ec..785338e 100644
---- a/examples/rping.c
-+++ b/examples/rping.c
-@@ -909,7 +909,7 @@ static int rping_test_client(struct rping_cb *cb)
- cb->state = RDMA_READ_ADV;
-
- /* Put some ascii text in the buffer. */
-- cc = sprintf(cb->start_buf, RPING_MSG_FMT, ping);
-+ cc = snprintf(cb->start_buf, cb->size, RPING_MSG_FMT, ping);
- for (i = cc, c = start; i < cb->size; i++) {
- cb->start_buf[i] = c;
- c++;