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
vimPlugins.blink-cmp: 0.7.3 -> 0.7.6 (#364100)
[NixPkgs.git]
/
pkgs
/
test
/
cc-wrapper
/
fortify2-example.c
blob
dfb5a8e872944ca59ce05268d829ba3af8d1c564
1
/* an example that should be protected by FORTIFY_SOURCE=2 but
2
* not FORTIFY_SOURCE=1 */
3
#include <stdio.h>
4
#include <string.h>
5
6
struct
buffer_with_pad
{
7
char
buffer
[
7
];
8
char
pad
[
25
];
9
};
10
11
int
main
(
int
argc
,
char
*
argv
[]) {
12
struct
buffer_with_pad b
;
13
strcpy
(
b
.
buffer
,
argv
[
1
]);
14
puts
(
b
.
buffer
);
15
return
0
;
16
}