Menu

#9 Fix build failure as static library

Unstable (example)
open
nobody
None
5
2025-07-07
2025-07-07
No

When building as static library it fails with:

server.c:2067:21: error: strncpy specified bound depends on the length of the source argument [-Werror
=stringop-overflow=]
 2067 |                     strncpy(tmp, it->path + len, tmplen);
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
server.c:2065:40: note: length computed here
 2065 |                     int tmplen = (int) strlen(it->path + len) + 1;
      |                                        ^~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Please accept attached patch to fix this error.

1 Attachments

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.