svn commit: r323692 - in head/sys/compat: linsysfs linux

Conrad Meyer cem at freebsd.org
Mon Sep 18 15:09:55 UTC 2017


Seems unhelpful here, as the maximum length of "226:%d" is shorter
than the buffer.

On Mon, Sep 18, 2017 at 3:38 AM, Hans Petter Selasky <hps at selasky.org> wrote:
> On 09/18/17 01:40, Conrad Meyer wrote:
>>
>> +                               sprintf(chardevname, "226:%d",
>> +                                   device_get_unit(dev));
>
>
> Hi,
>
> Try to use snprintf(). Define the chardevname size as a macro, or just
> allocate it on the stack if it is < 32 bytes.
>
> --HPS


More information about the svn-src-head mailing list