bloguetronica / cp2130-qt

A C++ class that uses libusb to interface with CP2130 devices. It can be used to configure the OTP ROM of such devices, as well as to control them. The class was made for Qt. If you wish to use a derived non-Qt version, please refer to https://github.com/bloguetronica/cp2130.
0 stars 0 forks source link

VLA are being allocated on the stack, not on the heap #9

Closed samuelfmlourenco closed 2 years ago

samuelfmlourenco commented 3 years ago

There are three instances of VLAs being allocated on the stack. C++ doesn't allow this, although gcc doesn't complain. These three instances are as follows:

This is a severe bug, motivated by the lack of option to use the -pedantic flag inside Qt Creator. However, it has no adverse effect, since gcc forgives the use of VLAs in such fashion.

samuelfmlourenco commented 2 years ago

Fixes implemented in version 2.1.0. Issue solved and closed.