diff options
| author | Paul Eggert | 1998-10-29 00:16:49 +0000 |
|---|---|---|
| committer | Paul Eggert | 1998-10-29 00:16:49 +0000 |
| commit | 1decb6802272deceb011219460fc380ba9929d41 (patch) | |
| tree | 634404e80eca436aba9736bf9e4ffc42ffcc65bb /src | |
| parent | 9f3ede3ccc877c3be4a56463a4c85f1edd1549b2 (diff) | |
| download | emacs-1decb6802272deceb011219460fc380ba9929d41.tar.gz emacs-1decb6802272deceb011219460fc380ba9929d41.zip | |
(XTread_socket): Check the returned value of XmbLookupString more carefully.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xterm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xterm.c b/src/xterm.c index b9a8d1c3ed4..e04b04ea651 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4239,6 +4239,13 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 4239 | &event.xkey, copy_buffer, | 4239 | &event.xkey, copy_buffer, |
| 4240 | 80, &keysym, | 4240 | 80, &keysym, |
| 4241 | &status_return); | 4241 | &status_return); |
| 4242 | if (status_return == XLookupNone) | ||
| 4243 | break; | ||
| 4244 | else if (status_return == XLookupChars) | ||
| 4245 | keysym = NoSymbol; | ||
| 4246 | else if (status_return != XLookupKeySym | ||
| 4247 | && status_return != XLookupBoth) | ||
| 4248 | abort (); | ||
| 4242 | } | 4249 | } |
| 4243 | else | 4250 | else |
| 4244 | nbytes = XLookupString (&event.xkey, copy_buffer, | 4251 | nbytes = XLookupString (&event.xkey, copy_buffer, |
| @@ -4357,6 +4364,9 @@ XTread_socket (sd, bufp, numchars, expected) | |||
| 4357 | 4364 | ||
| 4358 | count += nbytes; | 4365 | count += nbytes; |
| 4359 | numchars -= nbytes; | 4366 | numchars -= nbytes; |
| 4367 | |||
| 4368 | if (keysym == NoSymbol) | ||
| 4369 | break; | ||
| 4360 | } | 4370 | } |
| 4361 | else | 4371 | else |
| 4362 | abort (); | 4372 | abort (); |