File gpm-1.20.1-ps2_read.patch of Package gpm

--- src/gpm.c
+++ src/gpm.c
@@ -366,7 +366,7 @@
      
    if((i=m_type->packetlen-howmany)) /* still to get */
       do {
-         j = read(fd,edata-i,i); /* edata is pointer just after data */
+         j = read(fd,edata-i,howmany); /* edata is pointer just after data */
          if (kd_mode!=KD_TEXT && fifofd != -1 && opt_rawrep && j > 0)
             write(fifofd, edata-i, j);
          i -= j;
openSUSE Build Service is sponsored by