coverity 83682 suspicous signed bytewise reassembly
authorAndy Green <andy.green@linaro.org>
Sun, 30 Nov 2014 04:27:47 +0000 (12:27 +0800)
committerAndy Green <andy.green@linaro.org>
Sun, 30 Nov 2014 04:27:47 +0000 (12:27 +0800)
Signed-off-by: Andy Green <andy.green@linaro.org>
test-server/test-fraggle.c

index f2ea1e0..b3beab9 100644 (file)
@@ -111,7 +111,7 @@ callback_fraggle(struct libwebsocket_context *context,
 
                case FRAGSTATE_POST_PAYLOAD_SUM:
 
-                       sum = p[0] << 24;
+                       sum = ((unsigned int)p[0]) << 24;
                        sum |= p[1] << 16;
                        sum |= p[2] << 8;
                        sum |= p[3];