Lines Matching refs:buf
39 char buf[20]; in call_memcpy_type() local
40 …memcpy(&p.first, buf, 20); // expected-warning {{memcpy' will always overflow; destination buffer … in call_memcpy_type()
68 char buf[10]; in call_memset() local
69 __builtin_memset(buf, 0xff, 10); in call_memset()
70 …__builtin_memset(buf, 0xff, 11); // expected-warning {{'memset' will always overflow; destination … in call_memset()
74 char buf[10]; in call_snprintf() local
75 __builtin_snprintf(buf, 10, "merp"); in call_snprintf()
76 …__builtin_snprintf(buf, 11, "merp"); // expected-warning {{'snprintf' size argument is too large; … in call_snprintf()
80 char buf[10]; in call_vsnprintf() local
82 __builtin_vsnprintf(buf, 10, "merp", list); in call_vsnprintf()
83 …__builtin_vsnprintf(buf, 11, "merp", list); // expected-warning {{'vsnprintf' size argument is too… in call_vsnprintf()
86 void call_sprintf_chk(char *buf) { in call_sprintf_chk() argument
87 __builtin___sprintf_chk(buf, 1, 6, "hell\n"); in call_sprintf_chk()
88 …__builtin___sprintf_chk(buf, 1, 5, "hell\n"); // expected-warning {{'sprintf' will always over… in call_sprintf_chk()
89 …__builtin___sprintf_chk(buf, 1, 6, "hell\0 boy"); // expected-warning {{format string contains '\0… in call_sprintf_chk()
90 …__builtin___sprintf_chk(buf, 1, 2, "hell\0 boy"); // expected-warning {{format string contains '\0… in call_sprintf_chk()
92 __builtin___sprintf_chk(buf, 1, 6, "hello"); in call_sprintf_chk()
93 …__builtin___sprintf_chk(buf, 1, 5, "hello"); // expected-warning {{'sprintf' will always overflow;… in call_sprintf_chk()
94 __builtin___sprintf_chk(buf, 1, 2, "%c", '9'); in call_sprintf_chk()
95 …__builtin___sprintf_chk(buf, 1, 1, "%c", '9'); // expected-warning {{'sprintf' will always overflo… in call_sprintf_chk()
96 __builtin___sprintf_chk(buf, 1, 2, "%d", 9); in call_sprintf_chk()
97 …__builtin___sprintf_chk(buf, 1, 1, "%d", 9); // expected-warning {{'sprintf' will always overflow;… in call_sprintf_chk()
98 __builtin___sprintf_chk(buf, 1, 2, "%i", 9); in call_sprintf_chk()
99 …__builtin___sprintf_chk(buf, 1, 1, "%i", 9); // expected-warning {{'sprintf' will always overflow;… in call_sprintf_chk()
100 __builtin___sprintf_chk(buf, 1, 2, "%o", 9); in call_sprintf_chk()
101 …__builtin___sprintf_chk(buf, 1, 1, "%o", 9); // expected-warning {{'sprintf' will always overflow;… in call_sprintf_chk()
102 __builtin___sprintf_chk(buf, 1, 2, "%u", 9); in call_sprintf_chk()
103 …__builtin___sprintf_chk(buf, 1, 1, "%u", 9); // expected-warning {{'sprintf' will always overflow;… in call_sprintf_chk()
104 __builtin___sprintf_chk(buf, 1, 2, "%x", 9); in call_sprintf_chk()
105 …__builtin___sprintf_chk(buf, 1, 1, "%x", 9); // expected-warning {{'sprintf' will always overflow;… in call_sprintf_chk()
106 __builtin___sprintf_chk(buf, 1, 2, "%X", 9); in call_sprintf_chk()
107 …__builtin___sprintf_chk(buf, 1, 1, "%X", 9); // expected-warning {{'sprintf' will always overflow;… in call_sprintf_chk()
108 __builtin___sprintf_chk(buf, 1, 2, "%hhd", (char)9); in call_sprintf_chk()
109 …__builtin___sprintf_chk(buf, 1, 1, "%hhd", (char)9); // expected-warning {{'sprintf' will always o… in call_sprintf_chk()
110 __builtin___sprintf_chk(buf, 1, 2, "%hd", (short)9); in call_sprintf_chk()
111 …__builtin___sprintf_chk(buf, 1, 1, "%hd", (short)9); // expected-warning {{'sprintf' will always o… in call_sprintf_chk()
112 __builtin___sprintf_chk(buf, 1, 2, "%ld", 9l); in call_sprintf_chk()
113 …__builtin___sprintf_chk(buf, 1, 1, "%ld", 9l); // expected-warning {{'sprintf' will always overflo… in call_sprintf_chk()
114 __builtin___sprintf_chk(buf, 1, 2, "%lld", 9ll); in call_sprintf_chk()
115 …__builtin___sprintf_chk(buf, 1, 1, "%lld", 9ll); // expected-warning {{'sprintf' will always overf… in call_sprintf_chk()
116 __builtin___sprintf_chk(buf, 1, 2, "%%"); in call_sprintf_chk()
117 …__builtin___sprintf_chk(buf, 1, 1, "%%"); // expected-warning {{'sprintf' will always overflow; de… in call_sprintf_chk()
118 __builtin___sprintf_chk(buf, 1, 4, "%#x", 9); in call_sprintf_chk()
119 …__builtin___sprintf_chk(buf, 1, 3, "%#x", 9); // expected-warning {{'sprintf' will always overflow… in call_sprintf_chk()
120 __builtin___sprintf_chk(buf, 1, 4, "%p", (void *)9); in call_sprintf_chk()
121 …__builtin___sprintf_chk(buf, 1, 3, "%p", (void *)9); // expected-warning {{'sprintf' will always o… in call_sprintf_chk()
122 __builtin___sprintf_chk(buf, 1, 3, "%+d", 9); in call_sprintf_chk()
123 …__builtin___sprintf_chk(buf, 1, 2, "%+d", 9); // expected-warning {{'sprintf' will always overflow… in call_sprintf_chk()
124 __builtin___sprintf_chk(buf, 1, 3, "% i", 9); in call_sprintf_chk()
125 …__builtin___sprintf_chk(buf, 1, 2, "% i", 9); // expected-warning {{'sprintf' will always overflow… in call_sprintf_chk()
126 __builtin___sprintf_chk(buf, 1, 6, "%5d", 9); in call_sprintf_chk()
127 …__builtin___sprintf_chk(buf, 1, 5, "%5d", 9); // expected-warning {{'sprintf' will always overflow… in call_sprintf_chk()
128 __builtin___sprintf_chk(buf, 1, 9, "%f", 9.f); in call_sprintf_chk()
129 …__builtin___sprintf_chk(buf, 1, 8, "%f", 9.f); // expected-warning {{'sprintf' will always overflo… in call_sprintf_chk()
130 __builtin___sprintf_chk(buf, 1, 9, "%Lf", (long double)9.); in call_sprintf_chk()
131 …__builtin___sprintf_chk(buf, 1, 8, "%Lf", (long double)9.); // expected-warning {{'sprintf' will a… in call_sprintf_chk()
132 __builtin___sprintf_chk(buf, 1, 10, "%+f", 9.f); in call_sprintf_chk()
133 …__builtin___sprintf_chk(buf, 1, 9, "%+f", 9.f); // expected-warning {{'sprintf' will always overfl… in call_sprintf_chk()
134 __builtin___sprintf_chk(buf, 1, 12, "%e", 9.f); in call_sprintf_chk()
135 …__builtin___sprintf_chk(buf, 1, 11, "%e", 9.f); // expected-warning {{'sprintf' will always overfl… in call_sprintf_chk()
139 char buf[6]; in call_sprintf() local
140 …sprintf(buf, "hell\0 boy"); // expected-warning {{format string contains '\0' within the string bo… in call_sprintf()
141 …sprintf(buf, "hello b\0y"); // expected-warning {{format string contains '\0' within the string bo… in call_sprintf()
143 sprintf(buf, "hello"); in call_sprintf()
144 …sprintf(buf, "hello!"); // expected-warning {{'sprintf' will always overflow; destination buffer h… in call_sprintf()
145 sprintf(buf, "1234%%"); in call_sprintf()
146 …sprintf(buf, "12345%%"); // expected-warning {{'sprintf' will always overflow; destination buffer … in call_sprintf()
147 sprintf(buf, "1234%c", '9'); in call_sprintf()
148 …sprintf(buf, "12345%c", '9'); // expected-warning {{'sprintf' will always overflow; destination bu… in call_sprintf()
149 sprintf(buf, "1234%d", 9); in call_sprintf()
150 …sprintf(buf, "12345%d", 9); // expected-warning {{'sprintf' will always overflow; destination buff… in call_sprintf()
151 sprintf(buf, "1234%lld", 9ll); in call_sprintf()
152 …sprintf(buf, "12345%lld", 9ll); // expected-warning {{'sprintf' will always overflow; destination … in call_sprintf()
153 sprintf(buf, "12%#x", 9); in call_sprintf()
154 …sprintf(buf, "123%#x", 9); // expected-warning {{'sprintf' will always overflow; destination buffe… in call_sprintf()
155 sprintf(buf, "12%p", (void *)9); in call_sprintf()
156 …sprintf(buf, "123%p", (void *)9); // expected-warning {{'sprintf' will always overflow; destinatio… in call_sprintf()
157 sprintf(buf, "123%+d", 9); in call_sprintf()
158 …sprintf(buf, "1234%+d", 9); // expected-warning {{'sprintf' will always overflow; destination buff… in call_sprintf()
159 sprintf(buf, "123% i", 9); in call_sprintf()
160 …sprintf(buf, "1234% i", 9); // expected-warning {{'sprintf' will always overflow; destination buff… in call_sprintf()
161 sprintf(buf, "%5d", 9); in call_sprintf()
162 …sprintf(buf, "1%5d", 9); // expected-warning {{'sprintf' will always overflow; destination buffer … in call_sprintf()
163 sprintf(buf, "%.3f", 9.f); in call_sprintf()
164 …sprintf(buf, "5%.3f", 9.f); // expected-warning {{'sprintf' will always overflow; destination buff… in call_sprintf()
165 sprintf(buf, "%+.2f", 9.f); in call_sprintf()
166 …sprintf(buf, "%+.3f", 9.f); // expected-warning {{'sprintf' will always overflow; destination buff… in call_sprintf()
167 sprintf(buf, "%.0e", 9.f); in call_sprintf()
168 …sprintf(buf, "5%.1e", 9.f); // expected-warning {{'sprintf' will always overflow; destination buff… in call_sprintf()