Hi Szymon, 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. Johan -- 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