From 8a2659a4c3ef408548b33a5c71b3e0295f3dbbd3 Mon Sep 17 00:00:00 2001 From: isaac Date: Mon, 21 Sep 2009 15:25:23 +0000 Subject: [PATCH] i=rread,b=20771: - fixed vulnerable snprintf usage in ptlrpcd_start(). --- lustre/ptlrpc/ptlrpcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c index 9171ccf..c8f043b 100644 --- a/lustre/ptlrpc/ptlrpcd.c +++ b/lustre/ptlrpc/ptlrpcd.c @@ -360,7 +360,7 @@ int ptlrpcd_start(const char *name, struct ptlrpcd_ctl *pc) init_completion(&pc->pc_starting); init_completion(&pc->pc_finishing); spin_lock_init(&pc->pc_lock); - snprintf (pc->pc_name, sizeof (pc->pc_name), name); + snprintf(pc->pc_name, sizeof (pc->pc_name), "%s", name); pc->pc_set = ptlrpc_prep_set(); if (pc->pc_set == NULL) GOTO(out, rc = -ENOMEM); -- 1.8.3.1