IB/hfi1: Fix potential buffer overflow
authorTadeusz Struk <tadeusz.struk@intel.com>
Thu, 9 Jun 2016 14:51:51 +0000 (07:51 -0700)
committerDoug Ledford <dledford@redhat.com>
Sat, 18 Jun 2016 00:11:27 +0000 (20:11 -0400)
commitc078f0dd01b73c70b92a660cb1ce3dfc3cbf2903
treea4bccde38f9e65ee6c11a48bbd435af8e2a2609f
parent93dd0a097859a174817ea94ec55bfc29c5706454
IB/hfi1: Fix potential buffer overflow

This fixes potential buffer overflow because the sprintf function
doesn't check buffer boundaries. Use snprintf instead.

Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/hfi1/qsfp.c