]> git.baikalelectronics.ru Git - kernel.git/commit
mpssd: fix buffer overflow warning
authorMike Danese <mikedanese@google.com>
Fri, 20 May 2016 04:54:51 +0000 (21:54 -0700)
committerJonathan Corbet <corbet@lwn.net>
Fri, 3 Jun 2016 19:31:37 +0000 (13:31 -0600)
commitd89b0eed484a34bf9a16565f3279d5fe99114877
tree45580c74529d4e1f9ced50f3c7f986a2d8c6617c
parent893aaab7ba8c6a4d4114ec438f9872f0a4460de9
mpssd: fix buffer overflow warning

The compilation emits a warning in function ‘snprintf’,
    inlined from ‘set_cmdline’ at
    ../Documentation/mic/mpssd/mpssd.c:1541:9:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:64:10:
    warning: call to __builtin___snprintf_chk will always overflow
    destination buffer

This was introduced in commit ab5476f3a74a ("misc: mic: Update MIC host
daemon with COSM changes") and is fixed by reverting the changes to the
size argument of these snprintf statements.

Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Mike Danese <mikedanese@google.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Documentation/mic/mpssd/mpssd.c