msacm32: Fix greater than vs. less than typo in comparison. (Coverity)

Kai Blin kai.blin at gmail.com
Fri Jan 5 20:33:01 CST 2007


On Friday 05 January 2007 19:00, Alex Villací­s Lasso wrote:

> This is not a typo, but rather an unnecessary verification, from when I
> didn't know the true size of a DRVCONFIGINFO. The struct size should be
> *exactly 16 bytes*, even though only the first 12 bytes are used. This
> patch might even introduce a bug, where the struct info assumed by the
> codec to be 16 bytes when only 12 are allocated, and some smart-ass
> codec tries to use the last 4 bytes of the struct for its own purposes,
> which with this patch are now past the end of the allocated array. A
> more correct patch would fix the comment to indicate that exactly 16
> bytes are allocated for a 12-byte struct, and remove the conditional
> assignment altogether.

Oh, ok. Looking at the code and the comment, I wasn't sure which of that was 
the case, and sent the patch hoping for this kind of response. I'll fix it 
then.

Thanks,
Kai

-- 
Kai Blin, <kai Dot blin At gmail Dot com>
WorldForge developer    http://www.worldforge.org/
Wine developer          http://wiki.winehq.org/KaiBlin/
--
Will code for cotton.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20070106/44bffe9d/attachment.pgp


More information about the wine-devel mailing list