/* Copy SubXIDs, if present. */ if (serialized_snapshot->subxcnt > 0) { snapshot->subxip = snapshot->xip + serialized_snapshot->xcnt; memcpy(snapshot->subxip, ... ```
It assumes that subxcnt > 0 iff xcnt > 0. As I understand this is true. At least I hope so, otherwise this code can call memcpy passing NULL as a first argument. But Clang Static Analyzer is not aware of all this:
I propose a patch that makes static analyzers happy and makes intention of this code a little more obvious. -- Best regards, Aleksander Alekseev http://eax.me/
This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.