prova a inizializzare buff
memset(buff, 0x0, sizeof(buff))