On Thu, 28 Dec 2017 18:50:26 -0500
Steven Rostedt <[email protected]> wrote:

> +                     default:
> +                             if (!isalnum(*fmt)) {
> +                                     process = true;
> +                                     break;
> +                             }
> +                             /* Pointer dereference was already processed */
> +                             if (str < end) {
> +                                     len = copy = strlen(args);
> +                                     if (copy > end - str)
> +                                             copy = end - str;
> +                                     memcpy(str, args, copy);
> +                                     str += copy;

Actually, that should have been: str += len; as str will be used to
return the amount that would be processed, even if the size wasn't long
enough.

V2 coming up.

-- Steve

> +                                     args += len;
> +                             }
> +                     }

Reply via email to