[PATCH weston v2] xwayland: Fix X11 lock file size confusion

Daniel Stone daniel at fooishbar.org
Mon Nov 21 09:49:07 UTC 2016


Hi,

On 17 November 2016 at 14:41, Pekka Paalanen
<pekka.paalanen at collabora.co.uk> wrote:
> On Thu, 17 Nov 2016 12:17:59 +0000
> Daniel Stone <daniels at collabora.com> wrote:
>> @@ -148,13 +148,19 @@ bind_to_unix_socket(int display)
>>  static int
>>  create_lockfile(int display, char *lockfile, size_t lsize)
>>  {
>> -     char pid[16];
>> +     /* 10 decimal characters, trailing LF and NUL byte; see comment
>> +      * at end of function. */
>> +     char pid[11];
>
> Hi,
>
> um, 11? No room for the terminator-for-sure?
>
> Otherwise looks good.

Oh, too clever by half. I just left your explicit termination at byte
11 and have pushed it so we can all move on with our lives.

Thanks for the thorough review all.

Cheers,
Daniel


More information about the wayland-devel mailing list