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
b68e3879
Commit
b68e3879
authored
Jun 30, 2004
by
dscho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not use GNU-only getline
parent
b6caa102
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
vncviewer.c
libvncclient/vncviewer.c
+12
-3
No files found.
libvncclient/vncviewer.c
View file @
b68e3879
...
...
@@ -39,7 +39,7 @@ static char* NoPassword(rfbClient* client) {
#include <stdio.h>
#include <termios.h>
static
char
*
ReadPassword
(
rfbClient
*
client
)
{
int
i
=
8
;
int
i
;
char
*
p
=
malloc
(
9
);
struct
termios
save
,
noecho
;
p
[
0
]
=
0
;
...
...
@@ -47,8 +47,17 @@ static char* ReadPassword(rfbClient* client) {
noecho
=
save
;
noecho
.
c_lflag
&=
~
ECHO
;
if
(
tcsetattr
(
fileno
(
stdin
),
TCSAFLUSH
,
&
noecho
)
!=
0
)
return
p
;
fprintf
(
stderr
,
"Password: "
);
getline
(
&
p
,
&
i
,
stdin
);
if
(
i
>
0
&&
p
[
i
-
2
]
==
'\n'
)
p
[
i
-
2
]
=
0
;
i
=
0
;
while
(
1
)
{
int
c
=
fgetc
(
stdin
);
if
(
c
==
'\n'
)
break
;
if
(
i
<
8
)
{
p
[
i
]
=
c
;
i
++
;
p
[
i
]
=
0
;
}
}
tcsetattr
(
fileno
(
stdin
),
TCSAFLUSH
,
&
save
);
return
p
;
}
...
...
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