Is there a particular reason you want to use the limesuiteng-legacyapi library and the old API?
For new boards (and LimeSDR Mini 2.0) we recommend that you use the limesuiteng library and LimeSuiteNG library API instead since it is a more up to date software stack that is actively maintained and has issues like these already resolved.
Is that buffer defined as a file static variable, or is that an auto variable in a function? If the latter, you are likely exceeding the stack space allocated for the program.
I strongly urge that you at least allocate that buffer on the heap with operator new() (and assign it to a std::unique_ptr<> or std::shared_ptr<>), or preferably use a std::vector<> to contain the data.