]> git.ipfire.org Git - thirdparty/glibc.git/blame - elf/testobj2.c
Fix bad pointer / leak in regex code
[thirdparty/glibc.git] / elf / testobj2.c
CommitLineData
3d91edb2 1#include <dlfcn.h>
d3556ac9 2#include <stdlib.h>
2103c260 3#include <stdio.h>
3d91edb2 4
1a511d31 5#include "testobj.h"
fe60f764 6
482eec0d
UD
7int
8obj2func1 (int a __attribute__ ((unused)))
9{
10 return 43;
11}
12
13int
14obj2func2 (int a)
15{
16 return obj1func1 (a) + 10;
17}
3d91edb2
UD
18
19int
20preload (int a)
21{
22 int (*fp) (int) = dlsym (RTLD_NEXT, "preload");
23 if (fp != NULL)
24 return fp (a) + 10;
25 return 10;
26}
680d780a
UD
27
28void
29p (void)
30{
31 puts ("hello world");
32}