strcat -> strncat

sprintf -> snprintf

AKA, really big buffer overflow security fixes.

More to come, geez we have holes everywhere.
This commit is contained in:
Zephaniah E. Hull 2000-12-05 11:08:30 +00:00
parent 2652e77b5f
commit 66e0e31b57
29 changed files with 83 additions and 86 deletions

View file

@ -82,7 +82,7 @@ Qexpand_squiggle(const char *path, char *dest)
if (home) {
strcpy (dest, home);
strcat (dest, path+1); // skip leading ~
strncat (dest, path+1, sizeof(dest)); // skip leading ~
} else
strcpy (dest,path);
}