diff options
author | Pierre Ossman <ossman@cendio.se> | 2018-07-25 20:44:32 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2018-07-25 20:44:32 +0200 |
commit | f81148c43a25d4c69e635b6ad13eab674b473aca (patch) | |
tree | 608c1605e931b1fe2456ec7c236aec3c18207fbc /common/rfb/SMsgWriter.cxx | |
parent | d3a3fd692f9ee83164590338118034422308579c (diff) | |
download | tigervnc-f81148c43a25d4c69e635b6ad13eab674b473aca.tar.gz tigervnc-f81148c43a25d4c69e635b6ad13eab674b473aca.zip |
Avoid integer overflows in pixel size calculations
Diffstat (limited to 'common/rfb/SMsgWriter.cxx')
-rw-r--r-- | common/rfb/SMsgWriter.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rfb/SMsgWriter.cxx b/common/rfb/SMsgWriter.cxx index 6ef7692e..3da9413f 100644 --- a/common/rfb/SMsgWriter.cxx +++ b/common/rfb/SMsgWriter.cxx @@ -350,7 +350,7 @@ void SMsgWriter::writePseudoRects() 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; |