commit | f81148c43a25d4c69e635b6ad13eab674b473aca | [log] [tgz] |
---|---|---|
author | Pierre Ossman <ossman@cendio.se> | Wed Jul 25 20:44:32 2018 +0200 |
committer | Pierre Ossman <ossman@cendio.se> | Wed Jul 25 20:44:32 2018 +0200 |
tree | 608c1605e931b1fe2456ec7c236aec3c18207fbc | |
parent | d3a3fd692f9ee83164590338118034422308579c [diff] [blame] |
Avoid integer overflows in pixel size calculations
diff --git a/common/rfb/SMsgWriter.cxx b/common/rfb/SMsgWriter.cxx index 6ef7692..3da9413 100644 --- a/common/rfb/SMsgWriter.cxx +++ b/common/rfb/SMsgWriter.cxx
@@ -350,7 +350,7 @@ if (needSetCursor) { const Cursor& cursor = cp->cursor(); - rdr::U8Array data(cursor.width()*cursor.height() * cp->pf().bpp/8); + rdr::U8Array data(cursor.width()*cursor.height() * (cp->pf().bpp/8)); rdr::U8Array mask(cursor.getMask()); const rdr::U8* in;