Re: connection: add sanity check to avoid buffer overflow

2017-10-19 Thread Boram Park
wl_buffer_put is absolutely an internal static function. I don't plan to call or expose this function externally. Before knowing the intent of the developer, it just seems to require the sanity checking code. If the sanity check of the data size is the role of the caller, the code that checks wh

Re: connection: add sanity check to avoid buffer overflow

2017-10-19 Thread Mike Blumenkrantz
On one hand it may be dangerous for the scenario that you've described, but on the other hand why are you (or anyone) needing to call internal, non-exported libwayland functions? ?? On Thu, Oct 19, 2017 at 3:11 AM Boram Park wrote: > > > On 2017년 09월 28일 00:13, Derek Foreman wrote: > > On 2017-

Re: [PATCH wayland] cursor: Use shm_open() instead of XDG_RUNTIME_DIR files

2017-10-19 Thread Pekka Paalanen
On Thu, 19 Oct 2017 13:12:57 +0100 Emmanuel Gil Peyrot wrote: > On Wed, Oct 18, 2017 at 09:05:46AM -0500, Matt Hoosier wrote: > > On Wed, Oct 18, 2017 at 4:23 AM, Quentin Glidic > > wrote: > > > + fd = shm_open("/wayland-cursor-shared", O_CREAT | O_RDWR, 0); > > > + shm_unlink("/wa

Re: [PATCH wayland] cursor: Use shm_open() instead of XDG_RUNTIME_DIR files

2017-10-19 Thread Emmanuel Gil Peyrot
On Wed, Oct 18, 2017 at 09:05:46AM -0500, Matt Hoosier wrote: > On Wed, Oct 18, 2017 at 4:23 AM, Quentin Glidic > wrote: > > + fd = shm_open("/wayland-cursor-shared", O_CREAT | O_RDWR, 0); > > + shm_unlink("/wayland-cursor-shared"); > > This seems to be a departure from the anonymous

Re: connection: add sanity check to avoid buffer overflow

2017-10-19 Thread Boram Park
On 2017년 09월 28일 00:13, Derek Foreman wrote: On 2017-09-26 10:46 AM, Sergi Granell wrote: On Thu, 2017-09-14 at 09:21 +0900, Boram Park wrote: Before putting data into a buffer, we have to make sure that the data size is smaller than not only the buffer's full size but also the buffer's empt