# There is a Bug in libcanard dsdl,Please check --BeginFirmwareUpdateRequest

**URL:** <https://forum.opencyphal.org/t/there-is-a-bug-in-libcanard-dsdl-please-check-beginfirmwareupdaterequest/356>\
**Category:** Libcanard\
**Created:** [February 14, 2019, 3:46am UTC](https://forum.opencyphal.org/t/there-is-a-bug-in-libcanard-dsdl-please-check-beginfirmwareupdaterequest/356 "2019-02-14T03:46:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AlanLongJian](https://forum.opencyphal.org/letter_avatar_proxy/v4/letter/a/fbc32d/32.png) [@AlanLongJian](https://forum.opencyphal.org/u/AlanLongJian)\
**Post date:** [February 14, 2019, 3:46am UTC](https://forum.opencyphal.org/t/there-is-a-bug-in-libcanard-dsdl-please-check-beginfirmwareupdaterequest/356/1 "2019-02-14T03:46:44Z")

</div>

There‘s a Bug in uavcan\_protocol\_file\_BeginFirmwareUpdateRequest\_decode\_internal(…)  
This Bug lead to a wrong decode struct.  
line 89  
// Compound  
offset = uavcan\_protocol\_file\_Path\_decode\_internal(transfer, 0, &dest-\>image\_file\_remote\_path, dyn\_arr\_buf, offset);

The second actual parameter should not be ‘0’, It should be ‘payload\_len’;

fix:  
// Compound  
offset = uavcan\_protocol\_file\_Path\_decode\_internal(transfer, payload\_len, &dest-\>image\_file\_remote\_path, dyn\_arr\_buf, offset);

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [February 17, 2019, 6:18pm UTC](https://forum.opencyphal.org/t/there-is-a-bug-in-libcanard-dsdl-please-check-beginfirmwareupdaterequest/356/2 "2019-02-17T18:18:45Z")

</div>

Thanks for [moving the issue to GitHub](https://github.com/UAVCAN/libcanard/issues/83). In the future, please don’t hesitate to report all issues there directly. Thanks!
