repo.or.cz
/
NixPkgs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
biome: 1.9.2 -> 1.9.3
[NixPkgs.git]
/
pkgs
/
test
/
cc-wrapper
/
fortify3-example.c
blob
9a0a5f4792c33524e02c9b5105d15b2058f0e720
1
/* an example that should be protected by FORTIFY_SOURCE=3 but
2
* not FORTIFY_SOURCE=2 */
3
#include <stdio.h>
4
#include <string.h>
5
#include <stdlib.h>
6
7
8
int
main
(
int
argc
,
char
*
argv
[]) {
9
char
*
buffer
=
malloc
(
atoi
(
argv
[
2
]));
10
strcpy
(
buffer
,
argv
[
1
]);
11
puts
(
buffer
);
12
return
0
;
13
}