Adding syntact highlighting
This commit is contained in:
@@ -31,7 +31,7 @@ Lets go over each function:
|
||||
|
||||
### strcpy
|
||||
|
||||
```
|
||||
```c
|
||||
strcpy(char *dest, char *src)
|
||||
```
|
||||
|
||||
@@ -46,7 +46,7 @@ Arbitrary memory reads can be a problem since it could mean revealing data meant
|
||||
|
||||
### strncpy
|
||||
|
||||
```
|
||||
```c
|
||||
strncpy(char *dest, char *src, size_t dest_len)
|
||||
```
|
||||
|
||||
@@ -60,7 +60,7 @@ So `strncpy` can still read arbitrary memory and can still buffer overflow (tho
|
||||
|
||||
### strlcpy
|
||||
|
||||
```
|
||||
```c
|
||||
size_t strlcpy(char *dst, const char *src, size_t size)
|
||||
```
|
||||
|
||||
@@ -75,7 +75,7 @@ Point two is good so you can compare `size` to the return value to see if the so
|
||||
|
||||
### strdup
|
||||
|
||||
```
|
||||
```c
|
||||
char *strdup(const char *s);
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user