...
Code Block | ||||
---|---|---|---|---|
| ||||
/* In a.c */
extern int *a; /* UB 15 */
int f(unsigned i, int x) {
int tmp = a[i]; /* UB 37: read access */
a[i] = x; /* UB 37: write access */
return tmp;
}
/* In b.c */
int a[] = { 1, 2, 3, 4 }; /* UB 15 */
|
...
Code Block | ||||
---|---|---|---|---|
| ||||
/* In bash/bashline.h */
extern char* bash_groupname_completion_function(const char*, int); /* UB 15 */
/* In a.c */
#include <bashline.h>
void f(const char *s, int i) {
bash_groupname_completion_function(s, i); /* UB 41 */
}
/* In b.c */
int bash_groupname_completion_func; /* UB 15 */
|
...
CERT C Secure Coding Standard | ARR31-C. Use consistent array notation across all source files |
ISO/IEC TS 17961 | Declaring the same function or object in incompatible ways [funcdecl] |
Bibliography
[Hatton 1995] | Section 2.8.3 |
...