source: azure_iot_hub_f767zi/trunk/asp_baseplatform/lwip/contrib-2.1.0/Coverity/coverity.c@ 457

Last change on this file since 457 was 457, checked in by coas-nagasima, 4 years ago

ファイルを追加

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-csrc;charset=UTF-8
File size: 2.3 KB
Line 
1typedef unsigned char err_t;
2typedef unsigned int u32_t;
3typedef unsigned short u16_t;
4typedef unsigned char u8_t;
5typedef void sys_sem_t;
6typedef void sys_mutex_t;
7typedef size_t mem_size_t;
8typedef size_t memp_t;
9struct pbuf;
10struct netif;
11
12void* mem_malloc(mem_size_t size)
13{
14 __coverity_alloc__(size);
15}
16void mem_free(void* mem)
17{
18 __coverity_free__(mem);
19}
20
21void* memp_malloc(memp_t type)
22{
23 __coverity_alloc_nosize__();
24}
25void memp_free(memp_t type, void* mem)
26{
27 __coverity_free__(mem);
28}
29
30void sys_mutex_lock(sys_mutex_t* mutex)
31{
32 __coverity_exclusive_lock_acquire__(mutex);
33}
34void sys_mutex_unlock(sys_mutex_t* mutex)
35{
36 __coverity_exclusive_lock_release__(mutex);
37}
38
39u32_t sys_arch_sem_wait(sys_sem_t *sem, u32_t timeout)
40{
41 __coverity_recursive_lock_acquire__(sem);
42}
43void sys_sem_signal(sys_sem_t *sem)
44{
45 __coverity_recursive_lock_release__(sem);
46}
47
48err_t ethernet_input(struct pbuf *p, struct netif *inp)
49{
50 __coverity_tainted_string_sink_content__(p);
51}
52err_t tcpip_input(struct pbuf *p, struct netif *inp)
53{
54 __coverity_tainted_string_sink_content__(p);
55}
56err_t ip_input(struct pbuf *p, struct netif *inp)
57{
58 __coverity_tainted_string_sink_content__(p);
59}
60err_t ip4_input(struct pbuf *p, struct netif *inp)
61{
62 __coverity_tainted_string_sink_content__(p);
63}
64err_t ip6_input(struct pbuf *p, struct netif *inp)
65{
66 __coverity_tainted_string_sink_content__(p);
67}
68
69err_t pbuf_take(struct pbuf *buf, const void *dataptr, u16_t len)
70{
71 __coverity_tainted_string_argument__(buf);
72 __coverity_tainted_data_argument__(buf);
73}
74err_t pbuf_take_at(struct pbuf *buf, const void *dataptr, u16_t len, u16_t offset)
75{
76 __coverity_tainted_string_argument__(buf);
77 __coverity_tainted_data_argument__(buf);
78}
79err_t pbuf_copy(struct pbuf *p_to, struct pbuf *p_from)
80{
81 __coverity_tainted_data_transitive__(p_to, p_from);
82}
83u16_t pbuf_copy_partial(struct pbuf *p, void *dataptr, u16_t len, u16_t offset)
84{
85 __coverity_tainted_string_argument__(dataptr);
86 __coverity_tainted_data_argument__(dataptr);
87}
88u8_t pbuf_get_at(struct pbuf* p, u16_t offset)
89{
90 __coverity_tainted_data_return__();
91}
92
93void abort(void)
94{
95 __coverity_panic__();
96}
97
98int check_path(char* path, size_t size)
99{
100 if (size) {
101 __coverity_tainted_data_sanitize__(path);
102 return 1;
103 } else {
104 return 0;
105 }
106}
Note: See TracBrowser for help on using the repository browser.