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

Update mmap_write.m4 Enhance Security by Replacing strcpy() with strncpy() #228

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Shivam7-1
Copy link

In this PR replaces instances of strcpy() with strncpy() to mitigate the risk of buffer overflows. strncpy() ensures safer handling of strings by limiting the number of copied characters and adding null-termination, enhancing the overall security and stability of the code.

@cmouse
Copy link
Contributor

cmouse commented Dec 19, 2024

Hi, thank you for your patch. However, the patch is not really done correctly, and also it only applies to m4 file which is used to figure out details about how mmap'd regions work in a system.

@Shivam7-1
Copy link
Author

Hii @cmouse Thanks For Reviewing PR yes I got it it only works for this file which is used as Configuration I think

Could You also Please Review This PR dovecot/tools#4 is it correct?
Thanks

@cmouse
Copy link
Contributor

cmouse commented Dec 19, 2024

None of the three you opened are correct.

@cmouse
Copy link
Contributor

cmouse commented Dec 19, 2024

Also they don't really improve anything, so they are not very useful either.

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.

2 participants