37 lines
937 B
Diff
37 lines
937 B
Diff
--- numatop-2.2/common/os/os_util.c 2021-09-08 04:29:54.000000000 +0200
|
|
+++ numatop-2.2/common/os/os_util.c 2022-08-13 15:24:06.607330278 +0200
|
|
@@ -387,12 +387,10 @@
|
|
int len = strlen(str);
|
|
boolean_t ret = B_FALSE;
|
|
|
|
- if ((scopy = malloc(len + 1)) == NULL) {
|
|
+ if ((scopy = strdup(str)) == NULL) {
|
|
return (B_FALSE);
|
|
}
|
|
|
|
- strncpy(scopy, str, len);
|
|
- scopy[len] = 0;
|
|
cur = scopy;
|
|
|
|
while (cur < (scopy + len)) {
|
|
--- numatop-2.2/common/reg.c 2021-09-08 04:29:54.000000000 +0200
|
|
+++ numatop-2.2/common/reg.c 2022-08-13 16:16:12.060462958 +0200
|
|
@@ -240,7 +240,7 @@
|
|
}
|
|
|
|
if (len > 0) {
|
|
- (void) mvwprintw(r->hdl, line, pos_x, content);
|
|
+ (void) mvwprintw(r->hdl, line, pos_x, "%s", content);
|
|
}
|
|
|
|
if (r->mode != 0) {
|
|
@@ -267,7 +267,7 @@
|
|
}
|
|
|
|
if (len > 0) {
|
|
- (void) mvwprintw(r->hdl, line, pos_x, content);
|
|
+ (void) mvwprintw(r->hdl, line, pos_x, "%s", content);
|
|
}
|
|
|
|
(void) wattroff(r->hdl, A_REVERSE | A_BOLD);
|