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

endless recursion when avp is not is found in the dictionary #200

Open
MuhammadTalhaRao opened this issue Aug 13, 2024 · 0 comments
Open

Comments

@MuhammadTalhaRao
Copy link

In "/diam/dict/util.go" we try to find an avp and if we don't find it in its specific application and base dictionary the we get stuck in an endless loop.
i fixed this issue for my library by adding a few checks but this issue need to fixed properly

if ok {
	return avp, nil
} else if appid != 0 {
	parentAppId, isScoppedApp := parentAppIds[appid]
	if isScoppedApp {
		// Try searching 'parent' dictionary
		appid = parentAppId
	} else {
		// Try searching the base dictionary.
		appid = 0
	}
	goto retry
} else {
          // here the endless recursion occurs

	if codeU32, isUint32 := code.(uint32); isUint32 {
		avp, err = p.FindAVP(origAppID, codeU32)
		if err != nil {
			return MakeUnknownAVP(origAppID, codeU32, vendorID), err
		}

		return avp, nil
	}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant