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

Replace strncat with strcat #1950

Merged
merged 2 commits into from
Jun 1, 2024
Merged

Replace strncat with strcat #1950

merged 2 commits into from
Jun 1, 2024

Conversation

Caellian
Copy link
Collaborator

pwithcolors is allocated based on computed length so strncat produces a warning.

Closes #1948

pwithcolors is allocated based on computed length so strncat produces a
warning.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@github-actions github-actions bot added sources PR modifies project sources mouse events Issue or PR related to mouse events labels May 30, 2024
Copy link

netlify bot commented May 30, 2024

Deploy Preview for conkyweb canceled.

Name Link
🔨 Latest commit afccc20
🔍 Latest deploy log https://app.netlify.com/sites/conkyweb/deploys/665b2d8e2e3c150008da721e


for (j = 0; j < frontcolorchanges; j++) { pwithcolors[j] = SPECIAL_CHAR; }
pwithcolors[j] = 0;
strncat(pwithcolors, p, pwithcolors_len);
strcat(pwithcolors, p);
unsigned int strend = strlen(pwithcolors);
// and place the colorchanges not in front or in the visible part behind the
// visible part
Copy link
Owner

Choose a reason for hiding this comment

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

Should probably change the free() below to delete pwithcolors.

Signed-off-by: Tin Švagelj <tin.svagelj@live.com>
@Caellian Caellian merged commit 9358f56 into main Jun 1, 2024
63 checks passed
@Caellian Caellian deleted the fix/strncat-use branch June 1, 2024 14:22
@Caellian Caellian added the bug Bug report or bug fix PR label Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug report or bug fix PR mouse events Issue or PR related to mouse events sources PR modifies project sources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Build failure on aarch64 on Mageia Cauldron
2 participants