-
Notifications
You must be signed in to change notification settings - Fork 14
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
app_rpt: RPT_ALINKS / RPT_LINKS + associated l->links evalutation #502
Comments
Personally, I think this is a great candidate for using an |
Also, while evaluating the |
Mike and I were both looking at the array sizes and they are all over the map. In many places you will find an array sized to MAXLINKLIST (5120). Why this size? Was it supposed to be 10 blocks of 512 bytes? What was worse was that this size was used both for a character (string) array and for an array of pointers. I agree that we need to move the code base away from using fixed sized arrays in places that are dependent on the number of connections or linked nodes and Is there an |
That's kind of reflective of what I've observed in app_rpt over the years. There is often no rhyme or reason to the way buffer sizes are the way they are. Any time a buffer size is a nice roundish number, like 100, it's a good chance that's a completely arbitrary size somebody pulled out of a thin air.
Arrays by definition are fixed size, so that case might be a bit different. Is there an example that comes to mind? For a list of nodes, a linked list is probably the closest thing I can think of. They're already used in some places, so in the places we're still trying to use arrays, maybe we should move those to linked lists as well. |
While we have addressed the string size for RPT_ALINKS and RPT_LINKS, l->links are still limited to
[5120]-1
characters.In a large network (somewhere around 510 nodes depending on node name sizes) a network node could receive a link list larger than 5120 which will be truncated.
While not critical, evaluation of how the strings are stored and alternative methods should be reviewed at some point.
Reference PR #474 and PR #470
The text was updated successfully, but these errors were encountered: