Re: [PATCH 2/2] use the TASK_COMM_LEN macro instead ofsizeof(tsk->comm)

From: Alan Cox
Date: Sun Jun 14 2009 - 19:13:02 EST


On Sun, 14 Jun 2009 18:57:48 +0200
Evgeni Golov <sargentd@xxxxxxxxxxxx> wrote:

> sizeof(tsk->comm) == TASK_COMM_LEN, always, so why not use it?

Because if the size ever changes the existing code will remain correct
and your changes will become a dangerous buffer overrun ?

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/