mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-28 14:48:18 +08:00
protobuf-c/protobuf-c.c: prevent possible overflow on 64-bit systems
(fixes #106)
This commit is contained in:
parent
b915eed32f
commit
c1ff5d6bad
@ -2248,7 +2248,7 @@ protobuf_c_message_init_generic (const ProtobufCMessageDescriptor *desc,
|
|||||||
choose the number so that we would overflow if we needed
|
choose the number so that we would overflow if we needed
|
||||||
a slab larger than provided. */
|
a slab larger than provided. */
|
||||||
#define MAX_SCANNED_MEMBER_SLAB \
|
#define MAX_SCANNED_MEMBER_SLAB \
|
||||||
(sizeof(void*)*8 - 1 \
|
(sizeof(unsigned int)*8 - 1 \
|
||||||
- BOUND_SIZEOF_SCANNED_MEMBER_LOG2 \
|
- BOUND_SIZEOF_SCANNED_MEMBER_LOG2 \
|
||||||
- FIRST_SCANNED_MEMBER_SLAB_SIZE_LOG2)
|
- FIRST_SCANNED_MEMBER_SLAB_SIZE_LOG2)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user