Whamcloud - gitweb
LU-16346 utils: fix lctl stack smashing 54/49254/4
authorArtem Blagodarenko <ablagodarenko@ddn.com>
Fri, 25 Nov 2022 12:01:06 +0000 (12:01 +0000)
committerOleg Drokin <green@whamcloud.com>
Tue, 13 Dec 2022 16:09:23 +0000 (16:09 +0000)
commit30c5421ad567c851822f92c91595c9753ec648ec
tree8736f37373cf1f4ee9ae498933dd8d58b37bea80
parentd56ea0c80a959ebd9b393f2da048cc179cb16127
LU-16346 utils: fix lctl stack smashing

on aarch64 architecture:
... 
exec lustre/utils/.libs/lctl dl
*** stack smashing detected ***: terminated
Aborted (core dumped)

genlmsg_parse() was misused in yaml_netlink_msg_parse().
It requires passing maxtype+1 elements, but maxtype+1 as a number
of elements passed actually. Should be maxtype actually.

Signed-off-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Change-Id: Ic9cd0de35a028ca28bdd112700296d21e04a1cc5
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49254
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
lnet/utils/lnetconfig/liblnetconfig_netlink.c