diff options
-rw-r--r-- | sys/kern/subr_rman.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_rman.c b/sys/kern/subr_rman.c index ae350ed..ac1644c 100644 --- a/sys/kern/subr_rman.c +++ b/sys/kern/subr_rman.c @@ -866,7 +866,8 @@ sysctl_rman(SYSCTL_HANDLER_ARGS) if (res_idx == -1) { bzero(&urm, sizeof(urm)); urm.rm_handle = (uintptr_t)rm; - strlcpy(urm.rm_descr, rm->rm_descr, RM_TEXTLEN); + if (rm->rm_descr != NULL) + strlcpy(urm.rm_descr, rm->rm_descr, RM_TEXTLEN); urm.rm_start = rm->rm_start; urm.rm_size = rm->rm_end - rm->rm_start + 1; urm.rm_type = rm->rm_type; |