• Stefan Weil's avatar
    isdn: icn: Fix potentially wrong string handling · a29ae23f
    Stefan Weil authored
    This warning was reported by cppcheck:
    drivers/isdn/icn/icn.c:1641: error: Dangerous usage of 'rev' (strncpy doesn't always 0-terminate it)
    
    If strncpy copied 20 bytes, the destination string rev was not terminated.
    The patch adds one more byte to rev and makes sure that this byte is
    always 0.
    
    Cc: Karsten Keil <isdn@linux-pingi.de>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Tejun Heo <tj@kernel.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: netdev@vger.kernel.org
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarStefan Weil <weil@mail.berlios.de>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    a29ae23f
icn.c 42.1 KB