Static Value-Flow Analysis
Loading...
Searching...
No Matches
extapi.c
Go to the documentation of this file.
1#include <stddef.h>
2
3// Ensure NULL is always defined (but don't redefine)
4#ifndef NULL
5# define NULL ((void *)0)
6#endif
7
8/*
9 Functions with __attribute__((annotate("XXX"))) will be handle by SVF specifcially.
10 Their logical behaviours can't be described by C/C++ language. For example, "malloc()" functionality is to alloc an object to it's return value.
11
12 The description of methodProperties is as follows:
13
14 ALLOC_HEAP_RET, // returns a pointer to a newly allocated heap object
15 ALLOC_HEAP_ARGi // stores a pointer to an allocated object in *argi
16 ALLOC_STACK_RET, // returns a pointer to a newly allocated stack object
17 REALLOC_HEAP_RET,
18 MEMSET, // memcpy() operations
19 MEMCPY, // memset() operations
20 OVERWRITE, // svf function overwrite app function
21*/
22__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
23void *malloc(unsigned long size)
24{
25 return NULL;
26}
27
28__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
29void *fopen(const char *voidname, const char *mode)
30{
31 return NULL;
32}
33
34__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
35void *fopen64(const char *voidname, const char *mode)
36{
37 return NULL;
38}
39
40__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
41void *fdopen(int fd, const char *mode)
42{
43 return NULL;
44}
45
46__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
47struct dirent64 *readdir64(void *dirp)
48{
49 return NULL;
50}
51
52__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
53void *tmpvoid64(void)
54{
55 return NULL;
56}
57
58__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0*Arg1")))
59void *calloc(unsigned long nitems, unsigned long size)
60{
61 return NULL;
62}
63
64__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
65void *zmalloc(unsigned long size)
66{
67 return NULL;
68}
69
70__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
71void *gzdopen(int fd, const char *mode)
72{
73 return NULL;
74}
75
76__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
77void *iconv_open(const char *tocode, const char *fromcode)
78{
79 return NULL;
80}
81
82__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
83void *lalloc(unsigned long size, int a)
84{
85 return NULL;
86}
87
88__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
89void *lalloc_clear(unsigned long size, int a)
90{
91 return NULL;
92}
93
94__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
95long *nhalloc(unsigned int a, const char *b, int c)
96{
97 return NULL;
98}
99
100__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
101void *oballoc(unsigned long size)
102{
103 return NULL;
104}
105
106__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
107void *popen(const char *command, const char *type)
108{
109 return NULL;
110}
111
112__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
113void *pthread_getspecific(const char *a, const char *b)
114{
115 return NULL;
116}
117
118__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
119struct dirent *readdir(void *dirp)
120{
121 return NULL;
122}
123
124__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0*Arg1")))
125void* safe_calloc(unsigned nelem, unsigned elsize)
126{
127 return NULL;
128}
129
130__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
131void* safe_malloc(unsigned long size)
132{
133 return NULL;
134}
135
136__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0*Arg1")))
137char* safecalloc(int a, int b)
138{
139 return NULL;
140}
141
142__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
143char* safemalloc(int a, int b)
144{
145 return NULL;
146}
147
148__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
149void *setmntent(const char *voidname, const char *type)
150{
151 return NULL;
152}
153
154__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
155void *shmat(int shmid, const void *shmaddr, int shmflg)
156{
157 return NULL;
158}
159
160__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
161void* __sysv_signal(int a, void *b)
162{
163 return NULL;
164}
165
166__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
167void (*signal(int sig, void (*func)(int)))(int)
168{
169 return NULL;
170}
171
172__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
173char *tempnam(const char *dir, const char *pfx)
174{
175 return NULL;
176}
177
178__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
179void *tmpvoid(void)
180{
181 return NULL;
182}
183
184__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
185void* xcalloc(unsigned long size1, unsigned long size2)
186{
187 return NULL;
188}
189
190__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
191void* xmalloc(unsigned long size)
192{
193 return NULL;
194}
195
196__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
197void *__cxa_allocate_exception(unsigned long size)
198{
199 return NULL;
200}
201
202__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
203void* aligned_alloc(unsigned long size1, unsigned long size2)
204{
205 return NULL;
206}
207
208__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
209void* memalign(unsigned long size1, unsigned long size2)
210{
211 return NULL;
212}
213
214__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
215void *valloc(unsigned long size)
216{
217 return NULL;
218}
219
220__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
221void *pvalloc(unsigned long size)
222{
223 return NULL;
224}
225
226__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
227void *mmap64(void *addr, unsigned long len, int prot, int flags, int fildes, long off)
228{
229 return NULL;
230}
231
232__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
233char *XSetLocaleModifiers(char *a)
234{
235 return NULL;
236}
237
238__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
239char * __strdup(const char * string)
240{
241 return NULL;
242}
243
244__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
245char *crypt(const char *key, const char *salt)
246{
247 return NULL;
248}
249
250__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
251char *dlerror(void)
252{
253 return NULL;
254}
255
256__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
257void *dlopen(const char *voidname, int flags)
258{
259 return NULL;
260}
261
262__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
263const char *gai_strerror(int errcode)
264{
265 return NULL;
266}
267
268__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
269const char *gcry_cipher_algo_name(int errcode)
270{
271 return NULL;
272}
273
274__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
275const char *svfgcry_md_algo_name_(int errcode)
276{
277 return NULL;
278}
279
280__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
281char *getlogin(void)
282{
283 return NULL;
284}
285
286__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
287char *getpass(const char *prompt)
288{
289 return NULL;
290}
291
292__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
293const char * gnutls_strerror(int error)
294{
295 return NULL;
296}
297
298__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
299const char *gpg_strerror(unsigned int a)
300{
301 return NULL;
302}
303
304__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
305const char * gzerror(void* file, int * errnum)
306{
307 return NULL;
308}
309
310__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
311char *inet_ntoa(unsigned int in)
312{
313 return NULL;
314}
315
316__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
317void *initscr(void)
318{
319 return NULL;
320}
321
322__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
323void* llvm_stacksave()
324{
325 return NULL;
326}
327
328__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
329void *mmap(void *addr, unsigned long len, int prot, int flags, int fildes, long off)
330{
331 return NULL;
332}
333
334__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
335void *newwin(int nlines, int ncols, int begin_y, int begin_x)
336{
337 return NULL;
338}
339
340__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
341char *nl_langinfo(int item)
342{
343 return NULL;
344}
345
346__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
347void *opendir(const char *name)
348{
349 return NULL;
350}
351
352__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
353void *sbrk(long increment)
354{
355 return NULL;
356}
357
358__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
359char *strdup(const char *s)
360{
361 return NULL;
362}
363
364__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
365char *strndup(const char *s, unsigned long n)
366{
367 return NULL;
368}
369
370__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
371char *strerror(int errnum)
372{
373 return NULL;
374}
375
376__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
377char *strsignal(int errnum)
378{
379 return NULL;
380}
381
382__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
383char *textdomain(const char * domainname)
384{
385 return NULL;
386}
387
388__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
389char *tgetstr(char *id, char **area)
390{
391 return NULL;
392}
393
394__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
395char *tigetstr(char *capname)
396{
397 return NULL;
398}
399
400__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
401char *tmpnam(char *s)
402{
403 return NULL;
404}
405
406__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
407char *ttyname(int fd)
408{
409 return NULL;
410}
411
412__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
413char *getcwd(char *buf, unsigned long size)
414{
415 return NULL;
416}
417
418__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
419char *mem_realloc(void *ptr, unsigned long size)
420{
421 return NULL;
422}
423
424__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
425char *realloc(void *ptr, unsigned long size)
426{
427 return NULL;
428}
429
430__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:Arg1*Arg2")))
431char *reallocarray(void *ptr, unsigned long elems, unsigned long size)
432{
433 return NULL;
434}
435
436__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
437void* safe_realloc(void *p, unsigned long n)
438{
439 return NULL;
440}
441
442__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:Arg1*Arg2")))
443void* saferealloc(void *p, unsigned long n1, unsigned long n2)
444{
445 return NULL;
446}
447
448__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:UNKNOWN")))
449void* safexrealloc()
450{
451 return NULL;
452}
453
454
455char *strtok(char *str, const char *delim)
456{
457 return str;
458}
459
460char *strtok_r(char *str, const char *delim, char **saveptr)
461{
462 return str;
463}
464
465char* strsep(char** stringp, const char* delim)
466{
467 return *stringp;
468}
469
470__attribute__((annotate("REALLOC_HEAP_RET"), annotate("AllocSize:Arg1")))
471void *xrealloc(void *ptr, unsigned long bytes)
472{
473 return NULL;
474}
475
476// ::operator new (size (unsigned int))
477__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
478void *_Znwj(unsigned int size)
479{
480 return NULL;
481}
482
483// ::operator new (size (unsigned int), nothrow)
484__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
485void *_ZnwjRKSt9nothrow_t(unsigned int size, void *)
486{
487 return NULL;
488}
489
490// ::operator new (size (unsigned int), aligned)
491__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
492void *_ZnwjSt11align_val_t(unsigned int size, unsigned long)
493{
494 return NULL;
495}
496
497// ::operator new (size (unsigned int), aligned, nothrow)
498__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
499void *_ZnwjSt11align_val_tRKSt9nothrow_t(unsigned int size, unsigned long, void *)
500{
501 return NULL;
502}
503
504// ::operator new[] (size (unsigned int))
505__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
506void *_Znaj(unsigned int size)
507{
508 return NULL;
509}
510
511// ::operator new[] (size (unsigned int), nothrow)
512__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
513void *_ZnajRKSt9nothrow_t(unsigned int size, void *)
514{
515 return NULL;
516}
517
518// ::operator new[] (size (unsigned int), aligned)
519__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
520void *_ZnajSt11align_val_t(unsigned int size, unsigned long)
521{
522 return NULL;
523}
524
525// ::operator new[] (size (unsigned int), aligned, nothrow)
526__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
527void *_ZnajSt11align_val_tRKSt9nothrow_t(unsigned int size, unsigned long, void *)
528{
529 return NULL;
530}
531
532// ::operator new (size (size_t))
533__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
534void *_Znwm(unsigned long size)
535{
536 return NULL;
537}
538
539// ::operator new (size (size_t), nothrow)
540__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
541void *_ZnwmRKSt9nothrow_t(unsigned long size, void *)
542{
543 return NULL;
544}
545
546// ::operator new (size (size_t), aligned)
547__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
548void *_ZnwmSt11align_val_t(unsigned long size, unsigned long)
549{
550 return NULL;
551}
552
553// ::operator new (size (size_t), aligned, nothrow)
554__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
555void *_ZnwmSt11align_val_tRKSt9nothrow_t(unsigned long size, unsigned long, void *)
556{
557 return NULL;
558}
559
560// ::operator new[]
561__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
562void *_Znam(unsigned long size)
563{
564 return NULL;
565}
566
567// ::operator new[] (nothrow)
568__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
569void *_ZnamRKSt9nothrow_t(unsigned long size, void *)
570{
571 return NULL;
572}
573
574// ::operator new[] (aligned)
575__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
576void *_ZnamSt11align_val_t(unsigned long size, unsigned long)
577{
578 return NULL;
579}
580
581// ::operator new[] (aligned, nothrow)
582__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
583void *_ZnamSt11align_val_tRKSt9nothrow_t(unsigned long size, unsigned long, void *)
584{
585 return NULL;
586}
587
588__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:UNKNOWN")))
589int asprintf(char **__restrict strp, const char *__restrict fmt, ...)
590{
591 return 0;
592}
593
594__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:UNKNOWN")))
595int vasprintf(char **strp, const char *fmt, void* ap)
596{
597 return 0;
598}
599
600__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:UNKNOWN")))
601int db_create(void **dbp, void *dbenv, unsigned int flags)
602{
603 return 0;
604}
605
606__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:UNKNOWN")))
607int gnutls_pkcs12_bag_init(void *a)
608{
609 return 0;
610}
611
612__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:UNKNOWN")))
613int gnutls_pkcs12_init(void *a)
614{
615 return 0;
616}
617
618__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:UNKNOWN")))
619int gnutls_x509_crt_init(void *a)
620{
621 return 0;
622}
623
624__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:UNKNOWN")))
625int gnutls_x509_privkey_init(void *a)
626{
627 return 0;
628}
629
630__attribute__((annotate("ALLOC_HEAP_ARG0"), annotate("AllocSize:Arg2")))
631int posix_memalign(void **a, unsigned long b, unsigned long c)
632{
633 return 0;
634}
635
636__attribute__((annotate("ALLOC_HEAP_ARG1"), annotate("AllocSize:UNKNOWN")))
637int scandir(const char *__restrict dirp, struct dirent ***__restrict namelist, int (*filter)(const struct dirent *), int (*compar)(const struct dirent **, const struct dirent **))
638{
639 return 0;
640}
641
642__attribute__((annotate("ALLOC_HEAP_ARG2"), annotate("AllocSize:UNKNOWN")))
643int XmbTextPropertyToTextList(void *a, void *b, char ***c, int *d)
644{
645 return 0;
646}
647
648__attribute__((annotate("MEMCPY")))
649void llvm_memcpy_p0i8_p0i8_i64(char* dst, char* src, int sz, int flag){}
650
651__attribute__((annotate("MEMCPY")))
652void llvm_memcpy_p0_p0_i64(char* dst, char* src, int sz, int flag){}
653
654__attribute__((annotate("MEMCPY")))
655void llvm_memcpy_p0i8_p0i8_i32(char* dst, char* src, int sz, int flag){}
656
657__attribute__((annotate("MEMCPY")))
658void llvm_memcpy_p0_p0_i32(char* dst, char* src, int sz, int flag){}
659
660__attribute__((annotate("MEMCPY")))
661void llvm_memcpy(char* dst, char* src, int sz, int flag){}
662
663__attribute__((annotate("MEMCPY")))
664void llvm_memmove(char* dst, char* src, int sz, int flag){}
665
666__attribute__((annotate("MEMCPY")))
667void llvm_memmove_p0i8_p0i8_i64(char* dst, char* src, int sz, int flag){}
668
669__attribute__((annotate("MEMCPY")))
670void llvm_memmove_p0_p0_i64(char* dst, char* src, int sz, int flag){}
671
672__attribute__((annotate("MEMCPY")))
673void llvm_memmove_p0i8_p0i8_i32(char* dst, char* src, int sz, int flag){}
674
675__attribute__((annotate("MEMCPY")))
676void llvm_memmove_p0_p0_i32(char* dst, char* src, int sz, int flag){}
677
678__attribute__((annotate("MEMCPY")))
679void __memcpy_chk(char* dst, char* src, int sz, int flag){}
680
681__attribute__((annotate("MEMCPY")))
682void *memmove(void *str1, const void *str2, unsigned long n)
683{
684 return NULL;
685}
686
687__attribute__((annotate("MEMCPY")))
688void bcopy(const void *s1, void *s2, unsigned long n){}
689
690__attribute__((annotate("MEMCPY")))
691void *memccpy( void *__restrict dest, const void *__restrict src, int c, unsigned long count)
692{
693 return NULL;
694}
695
696__attribute__((annotate("MEMCPY")))
697void __memmove_chk(char* dst, char* src, int sz){}
698
699__attribute__((annotate("MEMSET")))
700void llvm_memset(char* dst, char elem, int sz, int flag){}
701
702__attribute__((annotate("MEMSET")))
703void llvm_memset_p0i8_i32(char* dst, char elem, int sz, int flag){}
704
705__attribute__((annotate("MEMSET")))
706void llvm_memset_p0_i32(char* dst, char elem, int sz, int flag){}
707
708__attribute__((annotate("MEMSET")))
709void llvm_memset_p0i8_i64(char* dst, char elem, int sz, int flag){}
710
711__attribute__((annotate("MEMSET")))
712void llvm_memset_p0_i64(char* dst, char elem, int sz, int flag){}
713
714__attribute__((annotate("MEMSET")))
715char *__memset_chk(char * dest, int c, unsigned long destlen, int flag)
716{
717 return NULL;
718}
719
720__attribute__((annotate("MEMSET")))
721char *wmemset(wchar_t * dst, wchar_t elem, int sz, int flag) {
722 return NULL;
723}
724
725
726__attribute__((annotate("STRCPY")))
727char * __strcpy_chk(char * dest, const char * src, unsigned long destlen)
728{
729 return NULL;
730}
731
732__attribute__((annotate("STRCAT")))
733char *__strcat_chk(char * dest, const char * src, unsigned long destlen)
734{
735 return NULL;
736}
737
738__attribute__((annotate("STRCAT")))
739wchar_t* __wcscat_chk(wchar_t * dest, const wchar_t * src)
740{
741 return NULL;
742}
743
744__attribute__((annotate("STRCPY")))
745char *stpcpy(char *__restrict dst, const char *__restrict src)
746{
747 return NULL;
748}
749
750__attribute__((annotate("STRCAT")))
751char *strcat(char *dest, const char *src)
752{
753 return NULL;
754}
755
756__attribute__((annotate("STRCAT")))
757char *wcscat(char *dest, const char *src)
758{
759 return NULL;
760}
761
762
763__attribute__((annotate("STRCPY")))
764char *strcpy(char *dest, const char *src)
765{
766 return NULL;
767}
768
769__attribute__((annotate("STRCAT")))
770char *strncat(char *dest, const char *src, unsigned long n)
771{
772 return NULL;
773}
774
775__attribute__((annotate("STRCAT")))
776wchar_t* wcsncat(wchar_t * dest, const wchar_t * src, int n) {
777 return NULL;
778}
779
780__attribute__((annotate("STRCAT")))
781char *__strncat_chk(char *dest, const char *src, unsigned long n)
782{
783 return NULL;
784}
785
786__attribute__((annotate("STRCAT")))
787wchar_t* __wcsncat_chk(wchar_t * dest, const wchar_t * src, int n) {
788 return NULL;
789}
790
791__attribute__((annotate("MEMCPY")))
792char *strncpy(char *dest, const char *src, unsigned long n)
793{
794 return NULL;
795}
796
797__attribute__((annotate("STRCPY")))
798char *wcscpy(wchar_t* dest, const wchar_t* src) {
799 return NULL;
800}
801
802__attribute__((annotate("MEMCPY")))
803unsigned long iconv(void* cd, char **__restrict inbuf, unsigned long *__restrict inbytesleft, char **__restrict outbuf, unsigned long *__restrict outbytesleft)
804{
805 return 0;
806}
807
808__attribute__((annotate("OVERWRITE")))
809void* _ZNSt5arrayIPK1ALm2EE4backEv(void *arg)
810{
811 void* ptr1 = (char*)arg + 0;
812 void* ptr2 = (char*)ptr1 + 0;
813 return ptr2;
814}
815
816__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
817void *SyGetmem(unsigned long size)
818{
819 return NULL;
820}
821
822void * __rawmemchr(const void * s, int c)
823{
824 return (void *)s;
825}
826
827struct jpeg_error_mgr *jpeg_std_error(struct jpeg_error_mgr * a)
828{
829 return a;
830}
831
832char *fgets(char *str, int n, void *stream)
833{
834 return str;
835}
836
837char *fgets_unlocked(char *str, int n, void *stream)
838{
839 return str;
840}
841
842char* gets(char *str)
843{
844 return str;
845}
846
847void *memchr(const void *str, int c, unsigned long n)
848{
849 return (void *)str;
850}
851
852void *memrchr(const void *str, int c, unsigned long n)
853{
854 return (void *)str;
855}
856
857void * mremap(void * old_address, unsigned long old_size, unsigned long new_size, int flags)
858{
859 return old_address;
860}
861
862char *strchr(const char *str, int c)
863{
864 return (char *)str;
865}
866
867char *__strchrnull(const char *s, int c)
868{
869 return (char *)s;
870}
871
872char *strcasestr(const char *haystack, const char *needle)
873{
874 return (char *)haystack;
875}
876
877char* index(const char *s, int c)
878{
879 return (char *)s;
880}
881
882char* rindex(const char *s, int c)
883{
884 return (char *)s;
885}
886
887char *strerror_r(int errnum, char *buf, unsigned long buflen)
888{
889 return buf;
890}
891
892char *strpbrk(const char *str1, const char *str2)
893{
894 return (char *)str1;
895}
896
897char *strptime(const void* s, const void* format, void* tm)
898{
899 return (char *)s;
900}
901
902char *strrchr(const char *str, int c)
903{
904 return (char *)str;
905}
906
907char *strstr(const char *haystack, const char *needle)
908{
909 return (char *)haystack;
910}
911
912char *tmpnam_r(char *s)
913{
914 return s;
915}
916
917int isalnum(int character)
918{
919 return character;
920}
921
922int isalpha(int character)
923{
924 return character;
925}
926
927int isblank(int character)
928{
929 return character;
930}
931
932int iscntrl(int c)
933{
934 return c;
935}
936
937int isdigit(int c)
938{
939 return c;
940}
941
942int isgraph(int c)
943{
944 return c;
945}
946
947int islower( int arg )
948{
949 return arg;
950}
951
952int isprint(int c)
953{
954 return c;
955}
956
957int ispunct(int argument)
958{
959 return argument;
960}
961
962int isspace(char c)
963{
964 return c;
965}
966
967int isupper(int c)
968{
969 return c;
970}
971
972int isxdigit(int c)
973{
974 return c;
975}
976
977char *asctime_r(const void *tm, char *buf)
978{
979 return buf;
980}
981
982void *bsearch(const void *key, const void *base, unsigned long nitems, unsigned long size, int (*compar)(const void *, const void *))
983{
984 return (void *)base;
985}
986
987struct mntent *getmntent_r(void *fp, struct mntent *mntbuf, char *buf, int buflen)
988{
989 return mntbuf;
990}
991
992struct tm *gmtime_r(const void *timer, struct tm *buf)
993{
994 return buf;
995}
996
997char * gzgets(void* file, char * buf, int len)
998{
999 return buf;
1000}
1001
1002struct tm *localtime_r(const void *timep, struct tm *result)
1003{
1004 return result;
1005}
1006
1007char *realpath(const char *__restrict path, char *__restrict resolved_path)
1008{
1009 return resolved_path;
1010}
1011
1012void* freopen64( const char* voidname, const char* mode, void* fp )
1013{
1014 return fp;
1015}
1016
1017void* freopen(const char* voidname, const char* mode, void* fp)
1018{
1019 return fp;
1020}
1021
1022const char *inet_ntop(int af, const void *__restrict src, char *__restrict dst, unsigned int size)
1023{
1024 return dst;
1025}
1026
1027double strtod(const char *str, char **endptr)
1028{
1029 *endptr = (char *)str;
1030 return 0.0;
1031}
1032
1033double strtod_l(const char *str, char **endptr, void *loc)
1034{
1035 *endptr = (char *)str;
1036 return 0.0;
1037}
1038
1039float strtof(const char *nptr, char **endptr)
1040{
1041 *endptr = (char *)nptr;
1042 return 0.0;
1043}
1044
1045float strtof_l(const char *nptr, char **endptr, void *loc)
1046{
1047 *endptr = (char *)nptr;
1048 return 0.0;
1049}
1050
1051long int strtol(const char *str, char **endptr, int base)
1052{
1053 *endptr = (char *)str;
1054 return 0;
1055}
1056
1057long long strtoll(const char *str, char **endptr, int base)
1058{
1059 *endptr = (char *)str;
1060 return 0;
1061}
1062
1063long double strtold(const char* str, char** endptr)
1064{
1065 *endptr = (char *)str;
1066 return 0.0;
1067}
1068
1069unsigned long int strtoul(const char *str, char **endptr, int base)
1070{
1071 *endptr = (char *)str;
1072 return 0;
1073}
1074
1075unsigned long long strtoull(const char *str, char **endptr, int base)
1076{
1077 *endptr = (char *)str;
1078 return 0;
1079}
1080
1081char *gcvt(double x, int ndigit, char *buf)
1082{
1083 return buf;
1084}
1085
1086void *memmem(const void *haystack, unsigned long haystacklen, const void *needle, unsigned long needlelen)
1087{
1088 return (void *)haystack;
1089}
1090
1091char* ctime_r(const char *timer, char *buf)
1092{
1093 return buf;
1094}
1095
1096int readdir_r(void *__restrict dir, void *__restrict entry, void **__restrict result)
1097{
1098 entry = *result;
1099 return 0;
1100}
1101
1102int getpwnam_r(const char *name, void *pwd, char *buf, unsigned long buflen, void **result)
1103{
1104 *result = pwd;
1105 return 0;
1106}
1107
1108int getpwuid_r(unsigned int uid, void *pwd, char *buf, unsigned long buflen, void **result)
1109{
1110 *result = pwd;
1111 return 0;
1112}
1113
1115{
1116 *arg1 = arg0;
1117}
1118
1119void* __dynamic_cast(void* source, const void* sourceTypeInfo, const void* targetTypeInfo, unsigned long castType)
1120{
1121 return source;
1122}
1123
1124void _ZNSsC1EPKcRKSaIcE(void **arg0, void *arg1)
1125{
1126 *arg0 = arg1;
1127}
1128
1130{
1131 *arg0 = arg1;
1132}
1133
1135char *getenv(const char *name)
1136{
1137 return getenv_global;
1138}
1139
1140unsigned short ctype_b_loc_global[10];
1141const unsigned short **__ctype_b_loc(void)
1142{
1143 return (const unsigned short **)&ctype_b_loc_global;
1144}
1145
1148{
1149 return (int **)&ctype_tolower_loc_global;
1150}
1151
1154{
1155 return (int **)&ctype_toupper_loc_global;
1156}
1157
1160{
1161 return error_global;
1162}
1163
1166{
1167 return h_error_global;
1168}
1169
1171void* __res_state(void)
1172{
1173 return res_state_global;
1174}
1175
1177char *asctime(const void *timeptr)
1178{
1179 return time_global;
1180}
1181
1182char *ctime(const void *timer)
1183{
1184 return time_global;
1185}
1186
1187void *gmtime(const void *timer)
1188{
1189 return time_global;
1190}
1191
1192void *localtime(const void *timer)
1193{
1194 return time_global;
1195}
1196
1198char * bindtextdomain(const char * domainname, const char * dirname)
1199{
1200 return bindtextdomain_global;
1201}
1202
1204char * bind_textdomain_codeset(const char * domainname, const char * codeset)
1205{
1207}
1208
1210char *ctermid(char *s)
1211{
1212 return s ? s : ctermid_global;
1213}
1214
1216char * dcgettext(const char * domainname, const char * msgid, int category)
1217{
1218 return gettext_global;
1219}
1220
1221char * dgettext(const char * domainname, const char * msgid)
1222{
1223 return gettext_global;
1224}
1225
1226char * dngettext(const char * domainname, const char * msgid, const char * msgid_plural, unsigned long int n)
1227{
1228 return gettext_global;
1229}
1230
1231char * gettext(const char * msgid)
1232{
1233 return gettext_global;
1234}
1235
1236char * ngettext(const char * msgid, const char * msgid_plural, unsigned long int n)
1237{
1238 return gettext_global;
1239}
1240
1242void *getgrgid(unsigned int gid)
1243{
1244 return getgrgid_global;
1245}
1246
1248void *getgrnam(const char *name)
1249{
1250 return getgrnam_global;
1251}
1252
1254void *gethostbyaddr(const void *addr, unsigned int len, int type)
1255{
1256 return gethostby_global;
1257}
1258
1259void *gethostbyname(const char *name)
1260{
1261 return gethostby_global;
1262}
1263
1264void *gethostbyname2(const char *name, int af)
1265{
1266 return gethostby_global;
1267}
1268
1270void *getmntent(void *stream)
1271{
1272 return getmntent_global;
1273}
1274
1276void *getprotobyname(const char *name)
1277{
1278 return getproto_global;
1279}
1280
1281void *getprotobynumber(int proto)
1282{
1283 return getproto_global;
1284}
1285
1287void *getpwent(void)
1288{
1289 return getpw_global;
1290}
1291
1292void *getpwnam(const char *name)
1293{
1294 return getpw_global;
1295}
1296
1297void *getpwuid(unsigned int uid)
1298{
1299 return getpw_global;
1300}
1301
1303void *getservbyname(const char *name, const char *proto)
1304{
1305 return getserv_global;
1306}
1307
1308void *getservbyport(int port, const char *proto)
1309{
1310 return getserv_global;
1311}
1312
1314void *getspnam(const char *name)
1315{
1316 return getspnam_global;
1317}
1318
1320const char *gnu_get_libc_version(void)
1321{
1323}
1324
1326const char * gnutls_check_version(const char * req_version)
1327{
1329}
1330
1332void *localeconv(void)
1333{
1334 return localeconv_global;
1335}
1336
1342
1344char *re_comp(const char *regex)
1345{
1346 return re_comp_global;
1347}
1348
1350char *setlocale(int category, const char *locale)
1351{
1352 return setlocale_global;
1353}
1354
1356char *tgoto(const char *cap, int col, int row)
1357{
1358 return tgoto_global;
1359}
1360
1362char *tparm(char *str, ...)
1363{
1364 return tparm_global;
1365}
1366
1368const char *zError(int a)
1369{
1370 return zError_global;
1371}
cJSON * p
Definition cJSON.cpp:2559
newitem type
Definition cJSON.cpp:2739
cJSON * a
Definition cJSON.cpp:2560
cJSON * n
Definition cJSON.cpp:2558
const cJSON *const b
Definition cJSON.h:255
const char *const name
Definition cJSON.h:264
char const int const cJSON_bool format
Definition cJSON.h:163
int index
Definition cJSON.h:170
int cJSON_bool fmt
Definition cJSON.h:160
cJSON * item
Definition cJSON.h:222
int count
Definition cJSON.h:216
int iscntrl(int c)
Definition extapi.c:932
void _ZNSsC1EPKcRKSaIcE(void **arg0, void *arg1)
Definition extapi.c:1124
char re_comp_global[10]
Definition extapi.c:1343
char * strsep(char **stringp, const char *delim)
Definition extapi.c:465
__attribute__((annotate("ALLOC_HEAP_RET"), annotate("AllocSize:Arg0")))
Definition extapi.c:22
char gnutls_check_version_global[10]
Definition extapi.c:1325
void * getgrnam_global[10]
Definition extapi.c:1247
int ctype_toupper_loc_global[10]
Definition extapi.c:1152
char setlocale_global[10]
Definition extapi.c:1349
char * tmpnam_r(char *s)
Definition extapi.c:912
char * asctime(const void *timeptr)
Definition extapi.c:1177
int error_global[10]
Definition extapi.c:1158
char * strpbrk(const char *str1, const char *str2)
Definition extapi.c:892
void * gethostby_global[10]
Definition extapi.c:1253
long long strtoll(const char *str, char **endptr, int base)
Definition extapi.c:1057
void * __res_state(void)
Definition extapi.c:1171
void * mremap(void *old_address, unsigned long old_size, unsigned long new_size, int flags)
Definition extapi.c:857
#define NULL
Definition extapi.c:5
char * fgets(char *str, int n, void *stream)
Definition extapi.c:832
void * getprotobyname(const char *name)
Definition extapi.c:1276
float strtof(const char *nptr, char **endptr)
Definition extapi.c:1039
float strtof_l(const char *nptr, char **endptr, void *loc)
Definition extapi.c:1045
void * getservbyport(int port, const char *proto)
Definition extapi.c:1308
char * ctime(const void *timer)
Definition extapi.c:1182
char * re_comp(const char *regex)
Definition extapi.c:1344
void * getpwnam(const char *name)
Definition extapi.c:1292
char * tparm(char *str,...)
Definition extapi.c:1362
long int strtol(const char *str, char **endptr, int base)
Definition extapi.c:1051
char * setlocale(int category, const char *locale)
Definition extapi.c:1350
long double strtold(const char *str, char **endptr)
Definition extapi.c:1063
char * ctime_r(const char *timer, char *buf)
Definition extapi.c:1091
char * dcgettext(const char *domainname, const char *msgid, int category)
Definition extapi.c:1216
const unsigned short ** __ctype_b_loc(void)
Definition extapi.c:1141
void * localeconv_global[10]
Definition extapi.c:1331
char * gets(char *str)
Definition extapi.c:842
char * __strchrnull(const char *s, int c)
Definition extapi.c:867
char * strtok_r(char *str, const char *delim, char **saveptr)
Definition extapi.c:460
char zError_global[10]
Definition extapi.c:1367
const char * gnu_get_libc_version(void)
Definition extapi.c:1320
int isdigit(int c)
Definition extapi.c:937
unsigned long long strtoull(const char *str, char **endptr, int base)
Definition extapi.c:1075
char * bind_textdomain_codeset(const char *domainname, const char *codeset)
Definition extapi.c:1204
void * freopen(const char *voidname, const char *mode, void *fp)
Definition extapi.c:1017
int isgraph(int c)
Definition extapi.c:942
const char * gnutls_check_version(const char *req_version)
Definition extapi.c:1326
int res_state_global[10]
Definition extapi.c:1170
int * __errno_location(void)
Definition extapi.c:1159
char getenv_global[10]
Definition extapi.c:1134
char * gcvt(double x, int ndigit, char *buf)
Definition extapi.c:1081
char * strchr(const char *str, int c)
Definition extapi.c:862
char * strrchr(const char *str, int c)
Definition extapi.c:902
void * getservbyname(const char *name, const char *proto)
Definition extapi.c:1303
char * rindex(const char *s, int c)
Definition extapi.c:882
struct mntent * getmntent_r(void *fp, struct mntent *mntbuf, char *buf, int buflen)
Definition extapi.c:987
void * getpwuid(unsigned int uid)
Definition extapi.c:1297
double strtod_l(const char *str, char **endptr, void *loc)
Definition extapi.c:1033
int ctype_tolower_loc_global[10]
Definition extapi.c:1146
void * gethostbyname(const char *name)
Definition extapi.c:1259
void * __rawmemchr(const void *s, int c)
Definition extapi.c:822
void _ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEC1EPKcRKS3_(void **arg0, void *arg1)
Definition extapi.c:1129
void * localeconv(void)
Definition extapi.c:1332
void * getmntent(void *stream)
Definition extapi.c:1270
char * gettext(const char *msgid)
Definition extapi.c:1231
int h_error_global[10]
Definition extapi.c:1164
char * strtok(char *str, const char *delim)
Definition extapi.c:455
void * gmtime(const void *timer)
Definition extapi.c:1187
void * bsearch(const void *key, const void *base, unsigned long nitems, unsigned long size, int(*compar)(const void *, const void *))
Definition extapi.c:982
void * getproto_global[10]
Definition extapi.c:1275
void * getgrgid(unsigned int gid)
Definition extapi.c:1242
char time_global[10]
Definition extapi.c:1176
int isspace(char c)
Definition extapi.c:962
char * fgets_unlocked(char *str, int n, void *stream)
Definition extapi.c:837
void _ZNSt8__detail15_List_node_base7_M_hookEPS0_(void *arg0, void **arg1)
Definition extapi.c:1114
unsigned short ctype_b_loc_global[10]
Definition extapi.c:1140
int ** __ctype_tolower_loc(void)
Definition extapi.c:1147
char tgoto_global[10]
Definition extapi.c:1355
int getpwuid_r(unsigned int uid, void *pwd, char *buf, unsigned long buflen, void **result)
Definition extapi.c:1108
void * getgrgid_global[10]
Definition extapi.c:1241
char bind_textdomain_codeset_global[10]
Definition extapi.c:1203
int * __h_errno_location(void)
Definition extapi.c:1165
void * gethostbyaddr(const void *addr, unsigned int len, int type)
Definition extapi.c:1254
int isprint(int c)
Definition extapi.c:952
int getpwnam_r(const char *name, void *pwd, char *buf, unsigned long buflen, void **result)
Definition extapi.c:1102
int ispunct(int argument)
Definition extapi.c:957
void * getgrnam(const char *name)
Definition extapi.c:1248
void * getspnam_global[10]
Definition extapi.c:1313
int islower(int arg)
Definition extapi.c:947
char * dgettext(const char *domainname, const char *msgid)
Definition extapi.c:1221
unsigned long int strtoul(const char *str, char **endptr, int base)
Definition extapi.c:1069
char gnu_get_libc_version_global[10]
Definition extapi.c:1319
char bindtextdomain_global[10]
Definition extapi.c:1197
int isblank(int character)
Definition extapi.c:927
char * bindtextdomain(const char *domainname, const char *dirname)
Definition extapi.c:1198
double strtod(const char *str, char **endptr)
Definition extapi.c:1027
char * getenv(const char *name)
Definition extapi.c:1135
char * strstr(const char *haystack, const char *needle)
Definition extapi.c:907
char * dngettext(const char *domainname, const char *msgid, const char *msgid_plural, unsigned long int n)
Definition extapi.c:1226
void * localtime(const void *timer)
Definition extapi.c:1192
void * gethostbyname2(const char *name, int af)
Definition extapi.c:1264
int isalnum(int character)
Definition extapi.c:917
void * memmem(const void *haystack, unsigned long haystacklen, const void *needle, unsigned long needlelen)
Definition extapi.c:1086
int readdir_r(void *__restrict dir, void *__restrict entry, void **__restrict result)
Definition extapi.c:1096
char ctermid_global[10]
Definition extapi.c:1209
char * strcasestr(const char *haystack, const char *needle)
Definition extapi.c:872
void * getprotobynumber(int proto)
Definition extapi.c:1281
int ** __ctype_toupper_loc(void)
Definition extapi.c:1153
char * realpath(const char *__restrict path, char *__restrict resolved_path)
Definition extapi.c:1007
void * getpw_global[10]
Definition extapi.c:1286
char * strptime(const void *s, const void *format, void *tm)
Definition extapi.c:897
void * memrchr(const void *str, int c, unsigned long n)
Definition extapi.c:852
char * ngettext(const char *msgid, const char *msgid_plural, unsigned long int n)
Definition extapi.c:1236
char * tgoto(const char *cap, int col, int row)
Definition extapi.c:1356
char * asctime_r(const void *tm, char *buf)
Definition extapi.c:977
int isupper(int c)
Definition extapi.c:967
int isxdigit(int c)
Definition extapi.c:972
void * getpwent(void)
Definition extapi.c:1287
char * ctermid(char *s)
Definition extapi.c:1210
struct tm * localtime_r(const void *timep, struct tm *result)
Definition extapi.c:1002
void * getserv_global[10]
Definition extapi.c:1302
void * getmntent_global[10]
Definition extapi.c:1269
const char * inet_ntop(int af, const void *__restrict src, char *__restrict dst, unsigned int size)
Definition extapi.c:1022
void * getspnam(const char *name)
Definition extapi.c:1314
void * memchr(const void *str, int c, unsigned long n)
Definition extapi.c:847
const char * zError(int a)
Definition extapi.c:1368
struct jpeg_error_mgr * jpeg_std_error(struct jpeg_error_mgr *a)
Definition extapi.c:827
void * pango_cairo_font_map_get_default(void)
Definition extapi.c:1338
void * pango_cairo_font_map_global[10]
Definition extapi.c:1337
void * freopen64(const char *voidname, const char *mode, void *fp)
Definition extapi.c:1012
struct tm * gmtime_r(const void *timer, struct tm *buf)
Definition extapi.c:992
char * gzgets(void *file, char *buf, int len)
Definition extapi.c:997
char tparm_global[10]
Definition extapi.c:1361
int isalpha(int character)
Definition extapi.c:922
void * __dynamic_cast(void *source, const void *sourceTypeInfo, const void *targetTypeInfo, unsigned long castType)
Definition extapi.c:1119
char gettext_global[10]
Definition extapi.c:1215
char * strerror_r(int errnum, char *buf, unsigned long buflen)
Definition extapi.c:887