mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-18 02:46:06 +00:00
Pull request for IPMI
Well, only one change, and I would normally just wait, but it will make the people trying to get rid of strncpy happy. Its a good change, anyway. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE/Q1c5nzg9ZpmiCaGYfOMkJGb/4EFAmVCsCgACgkQYfOMkJGb /4Hx6BAAjVYJOOlVrzL1P4RoJw6CPQcZqRtun9tJ44lCDt0ZBZMdc2RmMMS4b5jy ilNjKKez9xKWBIYSH1QEbs5wJlkq1KoQejc/dqZLTmWDQDciURf6LGLtQGSP7zH4 HKYahGCKo5iAnWYN/ZUgZklmkDehhjJWLZlTpfLwB/0ZaitPMkYuRIp9Expw2DIe n0fXibzE2V1dZkrYXtps/M23n3fjJCVK2uKXLmB2S9BIEnVlu5oOWnEw/9GSAdQX v+B9UV/A06sDWKIPxhkwZzrQZrUm42GHuOmllxJum6IJqDtxZjSMZuZjEsDHlkcr UrmQ60ep+cfKdyg5S0eKpFntcEhM+e1XIEhOBN8SZynCwULOZbcZBJpSF2eaULb+ 00bIqVMzv62c0Itm5dshWqNVQLgiJUhghnWF5jewy/nWtIROLiqRRLUyoyWKgioL lB3Ry/xIap3kyuzRu5MjZAQ2rtznAjyaQPYEkAbXxXsMxUmxsr+4eveEHENVXWwj NmX0toH51N0smmr4qByW3XdwqfTaji3uvv7Vm3DBCy0wF8JO0Q93/6WhEaODSOqs H9EYUDA2foJIakWqG6USV0f0yfweCpkEx+THTjT3crssbhQy/+TkOOqRShJYI3xD Dp1LkfNY8qbNzo9J4BDp1vc7Bjg09sFnNQeTX4L9EKlI2miNDFI= =xBYP -----END PGP SIGNATURE----- Merge tag 'for-linus-6.7-1' of https://github.com/cminyard/linux-ipmi Pull IPMI update from Corey Minyard: "Only one change, and I would normally just wait, but it will make the people trying to get rid of strncpy happy. Its a good change, anyway" * tag 'for-linus-6.7-1' of https://github.com/cminyard/linux-ipmi: ipmi: refactor deprecated strncpy
This commit is contained in:
commit
e576033588
@ -5377,20 +5377,15 @@ static void send_panic_events(struct ipmi_smi *intf, char *str)
|
|||||||
|
|
||||||
j = 0;
|
j = 0;
|
||||||
while (*p) {
|
while (*p) {
|
||||||
int size = strlen(p);
|
int size = strnlen(p, 11);
|
||||||
|
|
||||||
if (size > 11)
|
|
||||||
size = 11;
|
|
||||||
data[0] = 0;
|
data[0] = 0;
|
||||||
data[1] = 0;
|
data[1] = 0;
|
||||||
data[2] = 0xf0; /* OEM event without timestamp. */
|
data[2] = 0xf0; /* OEM event without timestamp. */
|
||||||
data[3] = intf->addrinfo[0].address;
|
data[3] = intf->addrinfo[0].address;
|
||||||
data[4] = j++; /* sequence # */
|
data[4] = j++; /* sequence # */
|
||||||
/*
|
|
||||||
* Always give 11 bytes, so strncpy will fill
|
memcpy_and_pad(data+5, 11, p, size, '\0');
|
||||||
* it with zeroes for me.
|
|
||||||
*/
|
|
||||||
strncpy(data+5, p, 11);
|
|
||||||
p += size;
|
p += size;
|
||||||
|
|
||||||
ipmi_panic_request_and_wait(intf, &addr, &msg);
|
ipmi_panic_request_and_wait(intf, &addr, &msg);
|
||||||
|
@ -1945,7 +1945,7 @@ static int new_ssif_client(int addr, char *adapter_name,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(addr_info->binfo.type, DEVICE_NAME,
|
strscpy(addr_info->binfo.type, DEVICE_NAME,
|
||||||
sizeof(addr_info->binfo.type));
|
sizeof(addr_info->binfo.type));
|
||||||
addr_info->binfo.addr = addr;
|
addr_info->binfo.addr = addr;
|
||||||
addr_info->binfo.platform_data = addr_info;
|
addr_info->binfo.platform_data = addr_info;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user