Merge "net: sockev: fix uninitialized data leak into userspace"

This commit is contained in:
Linux Build Service Account 2018-07-02 23:56:07 -07:00 committed by Gerrit - the friendly Code Review server
commit d8c2c85fcd

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
* Copyright (c) 2014-2015, 2018 The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -36,6 +36,8 @@ static struct netlink_kernel_cfg nlcfg = {
static void _sockev_event(unsigned long event, __u8 *evstr, int buflen)
{
memset(evstr, 0, buflen);
switch (event) {
case SOCKEV_SOCKET:
strlcpy(evstr, "SOCKEV_SOCKET", buflen);