File: basic.c

package info (click to toggle)
lintian 2.5.50.4
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 18,268 kB
  • ctags: 1,873
  • sloc: perl: 30,993; sh: 6,133; makefile: 3,443; xml: 1,805; ansic: 568; python: 65; cpp: 9; java: 9; tcl: 4
file content (27 lines) | stat: -rw-r--r-- 426 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>

static void
hardening_trigger(char *p, int i, void (*f)(char *))
{
    char test[10];
    memcpy(test, p, i);
    f(test);
    printf("%s", test);
}

int
lib_interface(void)
{
    printf("Hello world!\n");
    hardening_trigger(NULL, 0, NULL);
    return 0;
}

int
do_open (char *file) {
  return open (file, O_RDONLY);
}