The Second Law is not violated provided account is taken of the entropy of the whole system - including the energy expended by the demon in gathering the required information.