On Monday 24 of September 2012 11:08:45 Johan Hedberg wrote: > Hi Szymon, Hi Johan, > On Fri, Sep 21, 2012, Szymon Janc wrote: > > + case EIR_SSP_HASH: > > + if (data_len < 16) > > + break; > > + eir->hash = g_malloc(16); > > + memcpy(eir->hash, data, 16); > > + break; > > + > > + case EIR_SSP_RANDOMIZER: > > + if (data_len < 16) > > + break; > > + eir->randomizer = g_malloc(16); > > + memcpy(eir->randomizer, data, 16); > > + break; > > I suppose using g_memdup would be simpler than g_malloc + memcpy. Yeap that looks simpler, will use g_memdup in next version. -- BR Szymon Janc -- To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html