[PARPORT] Found a bug

Gilles Noyer (G.Noyer@lectra.com)
Tue, 19 Oct 1999 16:54:25 +0200


    I found a bug in the 2.3.22 version of ppdev
    the struct pp is bad initialized and the field pp->irqresponse can
be set to 1, causing some trouble in the irq function.
    so I suggest to have the following correction :

                               int pp_open (struct inode * inode, struct
file * file) {
                               unsigned int minor = MINOR
                               struct pp_struct *pp;

                              if (minor >= PARPORT_MAX)
                             return -ENXIO;

                             pp = kmalloc (sizeof (struct
++++++ memset(pp,0,(struct pp_struct));

Gilles Noyer.

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --

This archive was generated by hypermail 2.0b3 on Tue 19 Oct 1999 - 11:02:02 EDT