Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
L
libvncserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
libvncserver
Commits
f5abd4ab
Commit
f5abd4ab
authored
Apr 17, 2015
by
Christian Beier
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #69 from nopdotcom/master
Avoid divide-by-zero in raw encoding (OSX RealVNC)
parents
b7946a6f
79d938c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
rfbproto.c
libvncclient/rfbproto.c
+4
-1
No files found.
libvncclient/rfbproto.c
View file @
f5abd4ab
...
...
@@ -1946,7 +1946,10 @@ HandleRFBServerMessage(rfbClient* client)
int
y
=
rect
.
r
.
y
,
h
=
rect
.
r
.
h
;
bytesPerLine
=
rect
.
r
.
w
*
client
->
format
.
bitsPerPixel
/
8
;
linesToRead
=
RFB_BUFFER_SIZE
/
bytesPerLine
;
/* RealVNC 4.x-5.x on OSX can induce bytesPerLine==0,
usually during GPU accel. */
/* Regardless of cause, do not divide by zero. */
linesToRead
=
bytesPerLine
?
(
RFB_BUFFER_SIZE
/
bytesPerLine
)
:
0
;
while
(
h
>
0
)
{
if
(
linesToRead
>
h
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment