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