[BRLTTY] brltty crashing shortly after starting

Dave Mielke dave at mielke.cc
Tue Dec 1 21:58:38 EST 2015


[quoted lines by Mike Gorse on 2015/12/01 at 20:54 -0500]

>Much larger log--probably best not to spam everyone.
>http://straddlethebox.org/brltty.log

Yes, your device, for whatever reason, is indeed sending bad data. Please apply 
the attached patch (baum-1.patch) and send another log.

-- 
Dave Mielke           | 2213 Fox Crescent | The Bible is the very Word of God.
Phone: 1-613-726-0014 | Ottawa, Ontario   | http://Mielke.cc/bible/
EMail: Dave at Mielke.cc | Canada  K2A 1H7   | http://FamilyRadio.org/
-------------- next part --------------
diff --git a/Drivers/Braille/Baum/braille.c b/Drivers/Braille/Baum/braille.c
index a98db2b..a6b9a0d 100644
--- a/Drivers/Braille/Baum/braille.c
+++ b/Drivers/Braille/Baum/braille.c
@@ -1225,6 +1225,7 @@ verifyBaumPacket (
       case BAUM_RSP_ModuleRegistration:
       case BAUM_RSP_DataRegisters:
       case BAUM_RSP_ServiceRegisters:
+        if (byte < 4) return BRL_PVR_INVALID;
         *length += byte;
         break;
 
@@ -1488,8 +1489,9 @@ handleBaumModuleRegistrationEvent (BrailleDisplay *brl, const BaumResponsePacket
   if (packet->data.values.modular.data.registration.event == BAUM_MRE_Addition) {
     if (!writeBaumModuleRegistrationCommand(brl,
                                             moduleIdentifier, serialNumber,
-                                            BAUM_MRC_Acknowledge))
+                                            BAUM_MRC_Acknowledge)) {
       return 0;
+    }
 
     if (bmd) {
       BaumModuleRegistration *bmr;


More information about the BRLTTY mailing list