Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

isisd: fix rcap tlv double-free crash (backport #16809) #16845

Closed
wants to merge 2 commits into from

tests: update isisd fuzz test

abed6fe
Select commit
Loading
Failed to load commit list.
Closed

isisd: fix rcap tlv double-free crash (backport #16809) #16845

tests: update isisd fuzz test
abed6fe
Select commit
Loading
Failed to load commit list.
frrbot / frrbot completed Sep 17, 2024 in 30s

Style and/or linter errors found

Style and/or linter errors found

Details

Thanks for your contribution to FRR!

Click for style suggestions

diff --git a/isisd/isis_tlvs.c b/isisd/isis_tlvs.c
index 3237a8794..381465295 100644
--- a/isisd/isis_tlvs.c
+++ b/isisd/isis_tlvs.c
@@ -4404,8 +4404,8 @@ static int unpack_tlv_router_cap(enum isis_tlv_context context,
 	if (!tlvs->router_cap) {
 		/* First Router Capability TLV.
 		 * Allocate router cap structure and initialize SR Algorithms */
-		tlvs->router_cap = XCALLOC(MTYPE_ISIS_TLV,
-					   sizeof(struct isis_router_cap));
+		tlvs->router_cap =
+			XCALLOC(MTYPE_ISIS_TLV, sizeof(struct isis_router_cap));
 		for (int i = 0; i < SR_ALGORITHM_COUNT; i++)
 			tlvs->router_cap->algo[i] = SR_ALGORITHM_UNSET;
 	}

To apply the style suggestions:

curl https://gist.githubusercontent.com/polychaeta/2ad88e3414b0dcec079e138babb6ac52/raw/28f8f745293a98f915f3a26255ece07177645e48/style.diff | git apply -

If you are a new contributor to FRR, please see our contributing guidelines.

After making changes, you do not need to create a new PR. You should perform an amend or interactive rebase followed by a force push.