Patching my previous fix. It was not a good idea to use strchr() with
the strings that are not null-terminated:(
--- src/arch/linux/debugger/dosdebug.c  Sun Jul 16 03:18:03 2000
+++ src/arch/linux/debugger/dosdebug.c  Fri Aug 11 21:32:52 2000
@@ -186,10 +186,10 @@
   do {
     n=read(fdin, buf, sizeof(buf));
   } while (n == EAGAIN);
-  if (n >0) {
-    if ((p=strchr(buf,1))!=NULL) n=p-buf;
+  if (n > 0) {
+    if (p=memchr(buf, 1, n)) n=p-buf;
     write(1, buf, n);
-    if (p!=NULL) exit(0);
+    if (p) exit(0);
   }
 }
 

Reply via email to