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