1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-19 04:20:27 +01:00

Fix some off-by-ones

Signed-off-by: Tamas TEVESZ <ice@extreme.hu>
This commit is contained in:
Tamas TEVESZ
2010-09-23 03:24:35 +02:00
committed by Carlos R. Mafra
parent 091c9c366d
commit ae8937e152
2 changed files with 11 additions and 11 deletions

View File

@@ -439,7 +439,7 @@ int main(int argc, char **argv)
perror(file);
return 1;
}
strncat(buf, "/style", sizeof(buf) - strlen(buf) - 1);
strncat(buf, "/style", sizeof(buf) - strlen(buf));
if (stat(buf, &st) != 0 || !S_ISREG(st.st_mode)) { /* maybe symlink too? */
printf("%s: %s: style file not found or not a file\n", __progname, buf);