Introduce strlcat() instead of strcat(), and replace all sizeof() of buffers inside structures with constants where possible, to avoid bugs caused by reading the size of a pointer instead of the size of the buffer it points to.

This commit is contained in:
Andrew Wood
2023-07-23 01:57:00 +01:00
parent 80e3f791c4
commit c7e0bb727e
12 changed files with 171 additions and 80 deletions
+1
View File
@@ -148,6 +148,7 @@ opts_t opts_parse(int argc, char **argv)
/* "-s @" is valid, so allow it. */
if ('@' == *optarg)
break;
/* falls through */
case 'A':
case 'w':
case 'H':