Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

um,ethertap: use strncpy

[um maintainers appear to be vanished]

I can't prove the case pointed out in
https://bugzilla.kernel.org/show_bug.cgi?id=82341
is correct so let us play safe.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Alan and committed by
Greg Kroah-Hartman
7879b1d9 f0c7b474

+1 -1
+1 -1
arch/um/os-Linux/drivers/ethertap_user.c
··· 105 105 sprintf(data_fd_buf, "%d", data_remote); 106 106 sprintf(version_buf, "%d", UML_NET_VERSION); 107 107 if (gate != NULL) { 108 - strcpy(gate_buf, gate); 108 + strncpy(gate_buf, gate, 15); 109 109 args = setup_args; 110 110 } 111 111 else args = nosetup_args;