diff options
author | Brian Cameron <brian.cameron@sun.com> | 2007-05-09 04:11:46 +0000 |
---|---|---|
committer | Brian Cameron <bcameron@src.gnome.org> | 2007-05-09 04:11:46 +0000 |
commit | 6f408c8d9a19e69c194f368b932475634abe44b5 (patch) | |
tree | d6c40afbc59fa5a5158ba288e078168bf74314e1 /daemon | |
parent | fc71874d15f5f7aa8298ba58be9a7a19bd2b3c3e (diff) | |
download | gdm-6f408c8d9a19e69c194f368b932475634abe44b5.tar.gz |
In gdm_fdgetc must used an unsigned char buffer here because the GUI sends
2007-05-09 Brian Cameron <brian.cameron@sun.com>
* daemon/misc.c: In gdm_fdgetc must used an unsigned char
buffer here because the GUI sends username/password data
as utf8 and the daemon will interpret any character sent
with its high bit set as EOF unless we used unsigned here.
svn path=/trunk/; revision=4902
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/misc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/daemon/misc.c b/daemon/misc.c index a7ff2337..76e6887e 100644 --- a/daemon/misc.c +++ b/daemon/misc.c @@ -1073,9 +1073,15 @@ gdm_test_opt (const char *cmd, const char *help, const char *option) int gdm_fdgetc (int fd) { - char buf[1]; + unsigned char buf[1]; int bytes; + /* + * Must used an unsigned char buffer here because the GUI sends + * username/password data as utf8 and the daemon will interpret + * any character sent with its high bit set as EOF unless we + * used unsigned here. + */ VE_IGNORE_EINTR (bytes = read (fd, buf, 1)); if (bytes != 1) return EOF; |