[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#661473: marked as done (pu: package brltty/4.2-7+squeeze2)



Your message dated Sat, 12 May 2012 13:32:55 +0100
with message-id <dda96cc3369bdcdc1a3cdf68c2fc2f56@mail.adsl.funky-badger.org>
and subject line Closing requests for packages included in 6.0.5
has caused the Debian Bug report #661473,
regarding pu: package brltty/4.2-7+squeeze2
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
661473: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=661473
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: pu

Hello,

I would like to fix a bug in brltty for some devices: the esys and
iris braille devices whose size is bigger than 40 cells. See the
attached patch: the eubrl_usbWrite() part of it fixes displaying on them
(otherwise it remains completely blank). The esysiris_SysIdentity() part
of it fixes a buffer overflow when they are connected (same USB ID, but
bigger model number).

The changes have been tested with the real device.

Samuel

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.4 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
diff --git a/debian/changelog b/debian/changelog
index dd2abe1..284b19f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+brltty (4.2-7+squeeze2) squeeze; urgency=low
+
+  * debian/patches/40-esys-64.patch: New patch from upstream to fix support for
+    large esys/iris displays.
+
+ -- Samuel Thibault <sthibault@debian.org>  Mon, 27 Feb 2012 03:28:04 +0100
+
 brltty (4.2-7+squeeze1) squeeze; urgency=low
 
   * brltty-udeb.prebasconfig:
diff --git a/debian/patches/40-esys-64.patch b/debian/patches/40-esys-64.patch
new file mode 100644
index 0000000..e3625e0
--- /dev/null
+++ b/debian/patches/40-esys-64.patch
@@ -0,0 +1,41 @@
+diff --git a/Drivers/Braille/EuroBraille/eu_esysiris.c b/Drivers/Braille/EuroBraille/eu_esysiris.c
+index c55574d..6409142 100644
+--- a/Drivers/Braille/EuroBraille/eu_esysiris.c
++++ b/Drivers/Braille/EuroBraille/eu_esysiris.c
+@@ -212,6 +212,8 @@ static int esysiris_SysIdentity(BrailleDisplay *brl, char *packet)
+       break;
+     case 'T':
+       brlType = packet[1];
++      if (brlType >= TYPE_LAST)
++	brlType = UNKNOWN;
+       break;
+     default:
+       LogUnknownProtocolKey("esysiris_SysIdentity", packet[0]);
+diff --git a/Drivers/Braille/EuroBraille/eu_usb.c b/Drivers/Braille/EuroBraille/eu_usb.c
+index 4a71345..9e00213 100644
+--- a/Drivers/Braille/EuroBraille/eu_usb.c
++++ b/Drivers/Braille/EuroBraille/eu_usb.c
+@@ -86,9 +191,18 @@ eubrl_usbRead (BrailleDisplay *brl, void *buffer, size_t length, int wait)
+ ssize_t
+ eubrl_usbWrite(BrailleDisplay *brl, const void *buffer, size_t length)
+ {
+-  if(length>USB_PACKET_SIZE) return(-1);
+-  char packetToSend[USB_PACKET_SIZE];
+-  memset(packetToSend,0x55,USB_PACKET_SIZE);
+-  memcpy(packetToSend,buffer,length);
+-  return usbHidSetReport(usb->device, usb->definition.interface, 0, packetToSend, USB_PACKET_SIZE, 10);
++  size_t pos = 0;
++  while (pos < length) {
++    char packetToSend[USB_PACKET_SIZE];
++    size_t tosend = length - pos;
++    if (tosend > USB_PACKET_SIZE) {
++      tosend = USB_PACKET_SIZE;
++    }
++    memset(packetToSend,0x55,USB_PACKET_SIZE);
++    memcpy(packetToSend,buffer+pos,tosend);
++    if (usbHidSetReport(usb->device, usb->definition.interface, 0, packetToSend, USB_PACKET_SIZE, 10) < 0)
++      return -1;
++    pos += tosend;
++  }
++  return length;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index a93bc6d..3b58957 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
 20-sbin.patch
 30-upstream-table-fixes.patch
 40-silence-offset-warning.patch
+40-esys-64.patch

--- End Message ---
--- Begin Message ---
Version: 6.0.5

Hi,

All of the packages referenced by the closed bugs were included in the 6.0.5 point release which occured today.

Regards,

Adam


--- End Message ---

Reply to: