
ALT ls -l; cat /etc/hosts total 40 -rw-r--r-- 1 root root 3286 Dec 12 12:12 a.sh -rw-r--r-- 1 root root 307 Feb 27 2019 build -rw-rw-rw- 1 root root 37 Feb 27 2019 cnt -rw-rw-rw- 1 root root 3288 Dec 11 13:53 c.sh 127.0.0.1 localhost 127.0.1.1 linux # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters
![What is wrong with this C function? void test(char *string) { char buffer[15]; strcpy(buffer, string); } The function is missing a check to ensure that the size of the string being copied (string) is not larger than the size of the buffer (15). Without the check, it may lead to buffer overflow which can cause security vulnerabilities.](https://pbs.twimg.com/media/FjBqlwLUYAA9XvV.png?name=small&format=webp)
ALT What is wrong with this C function? void test(char *string) { char buffer[15]; strcpy(buffer, string); } The function is missing a check to ensure that the size of the string being copied (string) is not larger than the size of the buffer (15). Without the check, it may lead to buffer overflow which can cause security vulnerabilities.







