Skip to content

Commit 13c7444

Browse files
committed
kmod: replace strncpy() with strscpy_pad()
1 parent a7a174f commit 13c7444

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/kmod/rex.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ static ssize_t rexcfg_note_store(struct config_item *item, const char *str,
411411
struct rex_policy *rex = to_policy(item);
412412

413413
mutex_lock(&rex->lock);
414-
strncpy(rex->note, str, length);
414+
strscpy_pad(rex->note, str, sizeof(rex->note));
415415
mutex_unlock(&rex->lock);
416416

417417
return length;

0 commit comments

Comments
 (0)