-
Notifications
You must be signed in to change notification settings - Fork 64
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
Fix possible buffer overflow #275
base: develop
Are you sure you want to change the base?
Conversation
The files to check are: libhdt/src/libdcs/CSD_FMIndex.cpp The other files are straightforward responses to compiler warnings. |
3dc4aea
to
e58ebbf
Compare
The code now compiles cleanly using gcc-13.2 with |
This is ready to merge into branch Or I can do the merge on my local copy and push to branch Once that is done, I'll create a PR for the |
This PR should be applied to branch
develop
.These changes are because the compiler pointed out mis-use of
strncmp()
andmemcpy()
. I think that I've fixed the problems, but it's easy to make an off-by-one error in such code, so please review.(A better way of fixing this would be to use
std::string
orstd::basic_string<unsigned char>
)