FreeBSD Bugzilla – Attachment 169012 Details for
Bug 207786
gpioiic_callback() dereferences IIC "how" argument incorrectly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gpioiic callback fix
gpioiic-callback-20160405.diff (text/plain), 572 bytes, created by
Oleksandr Tymoshenko
on 2016-04-05 18:49:38 UTC
(
hide
)
Description:
gpioiic callback fix
Filename:
MIME Type:
Creator:
Oleksandr Tymoshenko
Created:
2016-04-05 18:49:38 UTC
Size:
572 bytes
patch
obsolete
>Index: sys/dev/gpio/gpioiic.c >=================================================================== >--- sys/dev/gpio/gpioiic.c (revision 297586) >+++ sys/dev/gpio/gpioiic.c (working copy) >@@ -155,10 +155,15 @@ > { > struct gpioiic_softc *sc = device_get_softc(dev); > int error, how; >+ int iic_how; > > how = GPIOBUS_DONTWAIT; >- if (data != NULL && (int)*data == IIC_WAIT) >- how = GPIOBUS_WAIT; >+ if (data != NULL) { >+ memcpy(&iic_how, data, sizeof(iic_how)); >+ if (iic_how == IIC_WAIT) >+ how = GPIOBUS_WAIT; >+ } >+ > error = 0; > switch (index) { > case IIC_REQUEST_BUS:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 207786
:
167825
| 169012