Messages in this thread | | | From | Azeem Shaikh <> | Date | Wed, 30 Aug 2023 11:47:21 -0400 | Subject | Re: [PATCH v2] kobject: Replace strlcpy with strscpy |
| |
> - len = strlcpy(&env->buf[env->buflen], subsystem, buffer_size); > - if (len >= buffer_size) { > - pr_warn("init_uevent_argv: buffer size of %d too small, needed %d\n", > - buffer_size, len); > + len = strscpy(&env->buf[env->buflen], subsystem, buffer_size); > + if (len < 0) { > + pr_warn("init_uevent_argv: insufficient buffer space " > + "(%u left) for %s\n", buffer_size, subsystem);
Please ignore this patch. There's some weird indentation that I noticed here that I'll fix in v3.
| |