[alsa-devel] [patch 1/2] ALSA: oxfw: some signedness bugs

Dan Carpenter dan.carpenter at oracle.com
Sat Dec 13 12:38:52 CET 2014


Think about a for loop:

	for (i = 0; i < xxx; i++) {

If "i" is really so high that it goes negative you have a very serious
issue whether it's signed or unsigned.  If it's signed then the loop is
a no-op but if it's unsigned then it corrupts memory.

That's not a win.

regards,
dan carpenter



More information about the Alsa-devel mailing list