Skip to content

1964 methods return size one pointers#1965

Draft
excaliburtb wants to merge 10 commits intonasa:masterfrom
excaliburtb:1964-methods-return-size-one-pointers
Draft

1964 methods return size one pointers#1965
excaliburtb wants to merge 10 commits intonasa:masterfrom
excaliburtb:1964-methods-return-size-one-pointers

Conversation

@excaliburtb
Copy link
Contributor

@excaliburtb excaliburtb commented Sep 25, 2025

fixes #1964

@excaliburtb excaliburtb marked this pull request as draft September 25, 2025 14:04
@coveralls
Copy link

coveralls commented Sep 26, 2025

Coverage Status

coverage: 55.75% (+0.2%) from 55.58%
when pulling 178de44 on excaliburtb:1964-methods-return-size-one-pointers
into 7710123 on nasa:master.

@excaliburtb excaliburtb marked this pull request as ready for review September 26, 2025 15:03
@sharmeye sharmeye marked this pull request as draft December 4, 2025 21:41
size_t len = strlen(reference_name);
size_t rem = (size_t)256 - len;
snprintf(&reference_name[len], rem, "[%d]", my_index[j]);
size_t rem = 256 - len;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to check that len isn't greater than 256 (which needs a const size_t MAX_LENGTH = 256; or something like that to eliminate the magic number. if it's greater it'll wrap and become a huge integer value

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

Successfully merging this pull request may close these issues.

methods that return pointers from tracked memory are almost always size one

3 participants