From 457eaeaf2317faa30c86d6d3fc289f40c58cf177 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Mon, 29 Jun 2015 08:38:38 -0400 Subject: [PATCH] Static analysis showed the unsigned int y is truncated to an unsigned char via _rotr16. It does not appear to be a problem with the library, but it may be a problem for users. The assert will alert in Debug builds (but not Release builds) --- misc.h | 1 + 1 file changed, 1 insertion(+) diff --git a/misc.h b/misc.h index 009c26e8..5b778c7c 100644 --- a/misc.h +++ b/misc.h @@ -708,6 +708,7 @@ template<> inline word16 rotlFixed(word16 x, unsigned int y) template<> inline word16 rotrFixed(word16 x, unsigned int y) { assert(y < 8*sizeof(x)); + assert(y <= 255); return y ? _rotr16(x, y) : x; }