summaryrefslogtreecommitdiff
path: root/doc/developer
diff options
context:
space:
mode:
authorCarmine Scarpitta <cscarpit@cisco.com>2024-06-21 17:47:46 +0200
committerCarmine Scarpitta <cscarpit@cisco.com>2024-06-24 10:44:14 +0200
commitdf97a9d13318f15c59bb055b90529e9e8378a619 (patch)
tree149a786710baec70b78b4cbe016b1485050b7da9 /doc/developer
parent375a02d2a30cd7a06b568187e23226ad5d083c87 (diff)
zebra: Fix NULL pointer dereference
The `locator` pointer is dereferenced before ensuring it is not NULL. Fix the issue by checking that the pointer is not NULL before dereferencing it. Fixes 1594013 ** CID 1594013: Null pointer dereferences (REVERSE_INULL) /zebra/zebra_srv6.c: 961 in zebra_srv6_sid_compose() ________________________________________________________________________________________________________ *** CID 1594013: Null pointer dereferences (REVERSE_INULL) /zebra/zebra_srv6.c: 961 in zebra_srv6_sid_compose() 955 struct srv6_locator *locator, 956 uint32_t sid_func) 957 { 958 uint8_t offset, func_len; 959 struct srv6_sid_format *format = locator->sid_format; 960 CID 1594013: Null pointer dereferences (REVERSE_INULL) Null-checking "locator" suggests that it may be null, but it has already been dereferenced on all paths leading to the check. 961 if (!sid_value || !locator) 962 return false; 963 964 if (format) { 965 offset = format->block_len + format->node_len; 966 func_len = format->function_len; Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Diffstat (limited to 'doc/developer')
0 files changed, 0 insertions, 0 deletions