Package: ucblogo
Version: 5.5-2.1
Severity: normal
Tags: patch upstream
Sometimes keyp returns true even if there's no input waiting:
Welcome to Berkeley Logo version 5.5
? pr keyp
true
This seems to be due to the fact that in lkeyp, nc is declared to be a
long, but ioctl(stdin, FIONREAD, &nc) only writes an int to nc. Thus,
if the upper half happens to contain crap, nc stays non-zero on 64-bit
architectures.
Here is the patch to fix this particular problem:
diff -urN ucblogo-5.5/files.c ucblogo-5.5-mod/files.c
--- ucblogo-5.5/files.c 2005-08-05 08:17:38.000000000 +0300
+++ ucblogo-5.5-mod/files.c 2014-04-14 23:11:01.789420761 +0300
@@ -626,7 +626,7 @@
NODE *lkeyp(NODE *args) {
#ifdef unix
- long nc;
+ int nc;
#endif
int c;
#ifdef WIN32
-- System Information:
Debian Release: 7.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fi_FI.UTF-8, LC_CTYPE=fi_FI.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages ucblogo depends on:
ii libc6 2.13-38+deb7u1
ii libice6 2:1.0.8-2
ii libncurses5 5.9-10
ii libsm6 2:1.2.1-2
ii libx11-6 2:1.5.0-1+deb7u1
ucblogo recommends no packages.
ucblogo suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]