summaryrefslogtreecommitdiffstats
path: root/pb_common.h
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-09-06 18:56:34 +0300
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-09-11 19:22:57 +0300
commit5e3edb54159d98b90b4926d870d01648f54fc1d6 (patch)
tree123cd72bfa979e554f651949702418b86d2e835d /pb_common.h
parent13a07e35b6b5f813078bde6a1a17d05f017bf714 (diff)
Fix memory leak with duplicated fields and PB_ENABLE_MALLOC.
If a required or optional field appeared twice in the message data, pb_decode will overwrite the old data with new one. That is fine, but with submessage fields, it didn't release the allocated subfields before overwriting. This bug can manifest if all of the following conditions are true: 1. There is a message with a "optional" or "required" submessage field that has type:FT_POINTER. 2. The submessage contains atleast one field with type:FT_POINTER. 3. The message data to be decoded has the submessage field twice in it.
Diffstat (limited to 'pb_common.h')
0 files changed, 0 insertions, 0 deletions