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
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:
VLA "readInputBuffer" declared in cp2130.cpp, at line 853;
VLA "writeCommandBuffer" declared in cp2130.cpp, at line 874.
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.
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.