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

Configure Feed

Select the types of activity you want to include in your feed.

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

+4 -9
+3 -8
drivers/char/ipmi/ipmi_msghandler.c
··· 5377 5377 5378 5378 j = 0; 5379 5379 while (*p) { 5380 - int size = strlen(p); 5380 + int size = strnlen(p, 11); 5381 5381 5382 - if (size > 11) 5383 - size = 11; 5384 5382 data[0] = 0; 5385 5383 data[1] = 0; 5386 5384 data[2] = 0xf0; /* OEM event without timestamp. */ 5387 5385 data[3] = intf->addrinfo[0].address; 5388 5386 data[4] = j++; /* sequence # */ 5389 - /* 5390 - * Always give 11 bytes, so strncpy will fill 5391 - * it with zeroes for me. 5392 - */ 5393 - strncpy(data+5, p, 11); 5387 + 5388 + memcpy_and_pad(data+5, 11, p, size, '\0'); 5394 5389 p += size; 5395 5390 5396 5391 ipmi_panic_request_and_wait(intf, &addr, &msg);
+1 -1
drivers/char/ipmi/ipmi_ssif.c
··· 1945 1945 } 1946 1946 } 1947 1947 1948 - strncpy(addr_info->binfo.type, DEVICE_NAME, 1948 + strscpy(addr_info->binfo.type, DEVICE_NAME, 1949 1949 sizeof(addr_info->binfo.type)); 1950 1950 addr_info->binfo.addr = addr; 1951 1951 addr_info->binfo.platform_data = addr_info;