Netatalk / netatalk

Netatalk is a Free and Open Source AFP fileserver. A *NIX or BSD system running Netatalk is capable of serving many Macintosh clients simultaneously as an AppleShare file server.
https://netatalk.io
GNU General Public License v2.0
334 stars 85 forks source link

Buffer overflow warning in etc/cnid_dbd/cmd_dbd_scanvol.c when compiling with clang on macOS #1104

Closed ghost closed 2 months ago

ghost commented 3 months ago
[88/115] Compiling C object etc/cnid_dbd/dbd.p/cmd_dbd_scanvol.c.o
../etc/cnid_dbd/cmd_dbd_scanvol.c:433:13: warning: 'strlcpy' will always overflow; destination buffer has size 1021, but size argument is 1024 [-Wbuiltin-memcpy-chk-size]
            strlcpy(pname + 3, namedup, sizeof(pname)); /* Prepends "../" */
ghost commented 3 months ago

@rdmark, I'm not sure of the best way to fix this one...