The PRG code won't pass some strict static analyzer (warning as error), pointing to a potential vulnerability here:
|
memcpy(data, tmp, nbytes); |
There seems to be an assumption about the execution condition of the second branch: nbytes <= 32, which might be ensured by the call to std::align. Perhaps this should be made more explicit in the code?