Error handling when reading driver configs

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error handling when reading driver configs

Maksim Ivanov
Hello,

The error handling seems to be incorrect in some cases when the driver configs cannot be read.

In file hotplug_libusb.c, function HPReadBundleValues() returns value -1 on some errors, but then its return value is treated like boolean. In file hotplug_linux.c, the function's return value is not checked.


Regards,
Maksim

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Error handling when reading driver configs

Ludovic Rousseau
2016-03-18 13:16 GMT+01:00 Maksim Ivanov <[hidden email]>:
Hello,

Hello,

I knew you sould report more problems :-)

The error handling seems to be incorrect in some cases when the driver configs cannot be read.

In file hotplug_libusb.c, function HPReadBundleValues() returns value -1 on some errors, but then its return value is treated like boolean.

Fixed in 9d0438ae384c33276d671cdf0830fe5d51901192
 
In file hotplug_linux.c, the function's return value is not checked.

Fixed in 152746d73149dff6218667b83b053233f2d3d476

Note that hotplug_linux should not be used since 2003, and hotplug_libusb since 2008.

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Error handling when reading driver configs

Maksim Ivanov
Hello Ludovic,

Thanks for fast fixing.


> I knew you sould report more problems :-)

:) I actually discovered this problem some time ago, just forgot to
report it together with the others.


> Note that hotplug_linux should not be used since 2003, and hotplug_libusb since 2008.
> See http://ludovicrousseau.blogspot.fr/2011/02/ for some history.

Thanks for the information.

We planned to use libusb hotplug mechanism in the PC/SC-Lite port
under Chrome Native Client (at least, in the first version of the
port). So the concern is now - aren't there any plans to remove this
branch of hotplug code?


Thanks,
Maksim


On Fri, Mar 18, 2016 at 1:50 PM, Ludovic Rousseau
<[hidden email]> wrote:

>
> 2016-03-18 13:16 GMT+01:00 Maksim Ivanov <[hidden email]>:
>>
>> Hello,
>
>
> Hello,
>
> I knew you sould report more problems :-)
>
>> The error handling seems to be incorrect in some cases when the driver configs cannot be read.
>>
>> In file hotplug_libusb.c, function HPReadBundleValues() returns value -1 on some errors, but then its return value is treated like boolean.
>
>
> Fixed in 9d0438ae384c33276d671cdf0830fe5d51901192
>
>>
>> In file hotplug_linux.c, the function's return value is not checked.
>
>
> Fixed in 152746d73149dff6218667b83b053233f2d3d476
>
> Note that hotplug_linux should not be used since 2003, and hotplug_libusb since 2008.
> See http://ludovicrousseau.blogspot.fr/2011/02/ for some history.
>
> Bye
>
> --
>  Dr. Ludovic Rousseau
>
> _______________________________________________
> Pcsclite-muscle mailing list
> [hidden email]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Error handling when reading driver configs

Ludovic Rousseau
2016-03-18 14:05 GMT+01:00 Maksim Ivanov <[hidden email]>:
Hello Ludovic,

Thanks for fast fixing.


> I knew you sould report more problems :-)

:) I actually discovered this problem some time ago, just forgot to
report it together with the others.

No more bug report?
So I can make a new official release of pcsc-lite now?


> Note that hotplug_linux should not be used since 2003, and hotplug_libusb since 2008.
> See http://ludovicrousseau.blogspot.fr/2011/02/ for some history.

Thanks for the information.

We planned to use libusb hotplug mechanism in the PC/SC-Lite port
under Chrome Native Client (at least, in the first version of the
port). So the concern is now - aren't there any plans to remove this
branch of hotplug code?

No plan to remove hotplug_libusb.c.
For example this hotplug mechanism should be used on non GNU/Linux systems like *BSD.

Bye

--
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
Reply | Threaded
Open this post in threaded view
|

Re: Error handling when reading driver configs

Maksim Ivanov
> No more bug report?
> So I can make a new official release of pcsc-lite now?

Yes, at this point.


> No plan to remove hotplug_libusb.c.
> For example this hotplug mechanism should be used on non GNU/Linux systems
> like *BSD.

Thanks for the clarification, great.


Regards,
Maksim


On Fri, Mar 18, 2016 at 2:53 PM, Ludovic Rousseau
<[hidden email]> wrote:

> 2016-03-18 14:05 GMT+01:00 Maksim Ivanov <[hidden email]>:
>>
>> Hello Ludovic,
>>
>> Thanks for fast fixing.
>>
>>
>> > I knew you sould report more problems :-)
>>
>> :) I actually discovered this problem some time ago, just forgot to
>> report it together with the others.
>
>
> No more bug report?
> So I can make a new official release of pcsc-lite now?
>
>>
>> > Note that hotplug_linux should not be used since 2003, and
>> > hotplug_libusb since 2008.
>> > See http://ludovicrousseau.blogspot.fr/2011/02/ for some history.
>>
>> Thanks for the information.
>>
>> We planned to use libusb hotplug mechanism in the PC/SC-Lite port
>> under Chrome Native Client (at least, in the first version of the
>> port). So the concern is now - aren't there any plans to remove this
>> branch of hotplug code?
>
>
> No plan to remove hotplug_libusb.c.
> For example this hotplug mechanism should be used on non GNU/Linux systems
> like *BSD.
>
> Bye
>
> --
>  Dr. Ludovic Rousseau
>
> _______________________________________________
> Pcsclite-muscle mailing list
> [hidden email]
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle


Maksim Ivanov

Software Engineer

[hidden email]
+49 (0)176 65889070

Google Germany GmbH

Dienerstraße 12

80331 München


Geschäftsführer: Matthew Scott Sucherman, Paul Terence Manicle

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Wenn Sie nicht der richtige Adressat
sind, leiten Sie diese bitte nicht weiter, informieren Sie den
Absender und löschen Sie die E-Mail und alle Anhänge. Vielen Dank.



This e-mail is confidential. If you are not the right addressee please
do not forward it, please inform the sender, and please erase this
e-mail including any attachments. Thanks.

_______________________________________________
Pcsclite-muscle mailing list
[hidden email]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle