On Thu, 30 Jul 2020 13:25:21 +0200 Halil Pasic <pa...@linux.ibm.com> wrote:
> On Thu, 30 Jul 2020 12:26:56 +0200 > Cornelia Huck <coh...@redhat.com> wrote: > > > On Wed, 29 Jul 2020 15:02:22 +0200 > > Halil Pasic <pa...@linux.ibm.com> wrote: > > > > > As pointed out by Peter, g_memdup(ms->loadparm, sizeof(ms->loadparm) + 1) > > > reads one past of the end of ms->loadparm, so g_memdup() can not be used > > > here. > > > > > > Let's use malloc and memcpy instead! > > > > Hm, an alternative would be to use g_strndup(). What do you think? > > Sure. It is more concise and does exactly what we want. I'm not too > familiar with the string utility funcitons of glib, so it didn't jup > at me. > > Shall I spin a v2? Sounds good.