lkml.org 
[lkml]   [2023]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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.

\
 
 \ /
  Last update: 2023-08-30 21:30    [W:1.009 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site