Fix Coverity Scan CID 340243 (Overrunning array of 1 bytes at byte offset 1 by dereferencing pointer ie->value.choice.UESecurityCapabilities.encryptionAlgorithms.buf + 1.)

This commit is contained in:
Dong Anyuan
2019-06-20 13:58:52 +09:00
parent 6087373184
commit e9267be8db
+1 -1
View File
@@ -135,7 +135,7 @@ do { \
do { \
(bitstring)->size=2; \
(bitstring)->bits_unused=0; \
(bitstring)->buf=calloc (1, sizeof (uint8_t)); \
(bitstring)->buf=calloc (2, sizeof (uint8_t)); \
(bitstring)->buf[0] = (encralg) >> 8; \
(bitstring)->buf[1] = (encralg); \
}while(0)