Read the comment before that memset. The structure might contain some
padding (bytes not belonging to any of its entries), these bytes are
random and if you do not zero them, you copy random data into userspace.
Mikulas
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/