File LibVNCServer-CVE-2020-14402,14403,14404.patch of Package LibVNCServer.15607

diff --git a/libvncserver/corre.c b/libvncserver/corre.c
index 8a845ea9..86ab99a6 100644
--- a/libvncserver/corre.c
+++ b/libvncserver/corre.c
@@ -233,7 +233,7 @@ subrectEncode##bpp(rfbClientPtr client, uint##bpp##_t *data, int w, int h) {
             seg = data+(j*w);                                                 \
             if (seg[x] != cl) {break;}                                        \
             i = x;                                                            \
-            while ((seg[i] == cl) && (i < w)) i += 1;                         \
+            while ((i < w) && (seg[i] == cl)) i += 1;                         \
             i -= 1;                                                           \
             if (j == y) vx = hx = i;                                          \
             if (i < vx) vx = i;                                               \
diff --git a/libvncserver/hextile.c b/libvncserver/hextile.c
index 52920d88..6e1bf82e 100644
--- a/libvncserver/hextile.c
+++ b/libvncserver/hextile.c
@@ -224,7 +224,7 @@ subrectEncode##bpp(rfbClientPtr cl, uint##bpp##_t *data, int w, int h,
                     seg = data+(j*w);                                           \
                     if (seg[x] != cl2) {break;}                                 \
                     i = x;                                                      \
-                    while ((seg[i] == cl2) && (i < w)) i += 1;                  \
+                    while ((i < w) && (seg[i] == cl2)) i += 1;                  \
                     i -= 1;                                                     \
                     if (j == y) vx = hx = i;                                    \
                     if (i < vx) vx = i;                                         \
diff --git a/libvncserver/rre.c b/libvncserver/rre.c
index 2103153c..4a65682f 100644
--- a/libvncserver/rre.c
+++ b/libvncserver/rre.c
@@ -200,7 +200,7 @@ static int                                                                    \
             seg = data+(j*w);                                                 \
             if (seg[x] != cl) {break;}                                        \
             i = x;                                                            \
-            while ((seg[i] == cl) && (i < w)) i += 1;                         \
+            while ((i < w) && (seg[i] == cl)) i += 1;                         \
             i -= 1;                                                           \
             if (j == y) vx = hx = i;                                          \
             if (i < vx) vx = i;                                               \