NoMagicAi / abb_librws

A C++ library for interfacing with ABB robot controllers supporting Robot Web Services
BSD 3-Clause "New" or "Revised" License
0 stars 5 forks source link

Added initializer list size check in RAPIDArray ctor. #26

Closed mkatliar closed 2 years ago

mkatliar commented 2 years ago

An linitializer list of incorrect size would cause memory corruption.

michalk-1 commented 2 years ago

I'm guessing... obscure errors when mis-used ? :)

mkatliar commented 2 years ago

I'm guessing... obscure errors when mis-used ? :)

This greedy constructor took precedence over the copy ctor.

RAPIDArray a;
RAPIDArray b = a; // this did not compile even though a copy ctor was explicitly added to the class.
michalk-1 commented 2 years ago

I get it now, thanks!